diff --git a/.azure-pipelines/live-test.yml b/.azure-pipelines/live-test.yml index b3ea3c9ddae1..27d627aa14f8 100644 --- a/.azure-pipelines/live-test.yml +++ b/.azure-pipelines/live-test.yml @@ -27,14 +27,6 @@ variables: DataLocation: $(Pipeline.Workspace)/$(ArtifactsName) SuppressAzurePowerShellBreakingChangeWarnings: true -schedules: -- cron: "0 19 * * *" - displayName: Daily Live Test - branches: - include: - - main - always: true - pr: none trigger: none diff --git a/.azure-pipelines/util/live-test-steps.yml b/.azure-pipelines/util/live-test-steps.yml index b338e1a82861..31df28f7309a 100644 --- a/.azure-pipelines/util/live-test-steps.yml +++ b/.azure-pipelines/util/live-test-steps.yml @@ -47,7 +47,7 @@ jobs: New-Item -Name $(ArtifactsName) -Path $(Pipeline.Workspace) -ItemType Directory -Force - task: DownloadPipelineArtifact@2 - condition: ${{ in(parameters.galleryName, 'DailyBuild', 'Sign') }} + condition: and(ne(variables['skipLatest'], 'true'), ${{ in(parameters.galleryName, 'DailyBuild', 'Sign') }}) displayName: Download artifacts from ${{ parameters.galleryName }} inputs: buildType: 'specific' diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8fa980d86e23..55da726030a7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,12 +1,12 @@ # @wyunchi-ms @dolauli @isra-fel are from the Azure PowerShell team. Adding them ensures they can merge the PR for those modules. # To make sure Network PRs go to the right branch, e.g. network-april -/src/Compute/ @EdwinBernal1 @grizzlytheodore @ntangy @sandido @wyunchi-ms @dolauli @isra-fel -/src/PolicyInsights/ @pilor @wyunchi-ms @dolauli @isra-fel -/src/Batch/ @wiboris @dpwatrous @wyunchi-ms @dolauli @isra-fel +/src/Compute/ @EdwinBernal1 @grizzlytheodore @ntangy @sandido @wyunchi-ms @dolauli @isra-fel @VeryEarly @YanaXu @vidai-msft @NoriZC @notyashhh @Pan-Qi @msJinLei +/src/PolicyInsights/ @pilor @wyunchi-ms @dolauli @isra-fel @VeryEarly @YanaXu @vidai-msft @NoriZC @notyashhh @Pan-Qi @msJinLei +/src/Batch/ @wiboris @dpwatrous @wyunchi-ms @dolauli @isra-fel @VeryEarly @YanaXu @vidai-msft @NoriZC @notyashhh @Pan-Qi @msJinLei # Make sure Device Registry team gets notified of any DeviceRegistry PRs: # PRLabel: %Device Registry -/src/DeviceRegistry/ @marcodalessandro @rohankhandelwal @riteshrao @davidemontanari @wyunchi-ms @dolauli @isra-fel +/src/DeviceRegistry/ @marcodalessandro @rohankhandelwal @riteshrao @davidemontanari @wyunchi-ms @dolauli @isra-fel @VeryEarly @YanaXu @vidai-msft @NoriZC @notyashhh @Pan-Qi @msJinLei # Make sure changes to .github folder go through our team's double check /.github/ @wyunchi-ms @dolauli @isra-fel diff --git a/generated/DataMigration/DataMigration.Autorest/exports/New-AzDataMigrationToSqlManagedInstance.ps1 b/generated/DataMigration/DataMigration.Autorest/exports/New-AzDataMigrationToSqlManagedInstance.ps1 index af00547e125b..db543b75740f 100644 --- a/generated/DataMigration/DataMigration.Autorest/exports/New-AzDataMigrationToSqlManagedInstance.ps1 +++ b/generated/DataMigration/DataMigration.Autorest/exports/New-AzDataMigrationToSqlManagedInstance.ps1 @@ -23,6 +23,12 @@ Create a new database migration to a given SQL Managed Instance. $sourcePassword = ConvertTo-SecureString -String $password -AsPlainText -Force $filesharePassword = ConvertTo-SecureString -String $password -AsPlainText -Force New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -StorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -StorageAccountKey "aaaaacccccoouunntkkkkeeeyyy" -FileSharePath "\\filesharepath.com\SharedBackup\MyBackUps" -FileShareUsername "filesharepath\User" -FileSharePassword $filesharePassword -SourceSqlConnectionAuthentication "SqlAuthentication" -SourceSqlConnectionDataSource "LabServer.database.net" -SourceSqlConnectionUserName "User" -SourceSqlConnectionPassword $sourcePassword -SourceDatabaseName "AdventureWorks" +.Example +New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -AzureBlobAuthType "ManagedIdentity" -AzureBlobIdentityType "SystemAssigned" -AzureBlobStorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -AzureBlobContainerName "container" +.Example +New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -AzureBlobAuthType "ManagedIdentity" -AzureBlobIdentityType "UserAssigned" -AzureBlobUserAssignedIdentity "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyUserAssignedIdentity" -AzureBlobStorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -AzureBlobContainerName "container" +.Example +New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -AzureBlobStorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -AzureBlobContainerName "container" -AzureBlobAccountKey "accountKey" .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.IDatabaseMigrationSqlMi diff --git a/generated/DataMigration/DataMigration.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/DataMigration/DataMigration.Autorest/exports/ProxyCmdletDefinitions.ps1 index ac6074e6bf05..dd0bda8c2005 100644 --- a/generated/DataMigration/DataMigration.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/DataMigration/DataMigration.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -5394,6 +5394,12 @@ Create a new database migration to a given SQL Managed Instance. $sourcePassword = ConvertTo-SecureString -String $password -AsPlainText -Force $filesharePassword = ConvertTo-SecureString -String $password -AsPlainText -Force New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -StorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -StorageAccountKey "aaaaacccccoouunntkkkkeeeyyy" -FileSharePath "\\filesharepath.com\SharedBackup\MyBackUps" -FileShareUsername "filesharepath\User" -FileSharePassword $filesharePassword -SourceSqlConnectionAuthentication "SqlAuthentication" -SourceSqlConnectionDataSource "LabServer.database.net" -SourceSqlConnectionUserName "User" -SourceSqlConnectionPassword $sourcePassword -SourceDatabaseName "AdventureWorks" +.Example +New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -AzureBlobAuthType "ManagedIdentity" -AzureBlobIdentityType "SystemAssigned" -AzureBlobStorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -AzureBlobContainerName "container" +.Example +New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -AzureBlobAuthType "ManagedIdentity" -AzureBlobIdentityType "UserAssigned" -AzureBlobUserAssignedIdentity "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyUserAssignedIdentity" -AzureBlobStorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -AzureBlobContainerName "container" +.Example +New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -AzureBlobStorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -AzureBlobContainerName "container" -AzureBlobAccountKey "accountKey" .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.IDatabaseMigrationSqlMi diff --git a/generated/DataMigration/DataMigration.Autorest/generate-info.json b/generated/DataMigration/DataMigration.Autorest/generate-info.json index f013f27bf009..ebcf7b26accf 100644 --- a/generated/DataMigration/DataMigration.Autorest/generate-info.json +++ b/generated/DataMigration/DataMigration.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "1051dcfe-079d-4e3d-8a48-42fe1e5ad7f5" + "generate_Id": "3d863b05-0047-489c-b7f2-6b7dfd14dd0a" } diff --git a/generated/DataMigration/DataMigration.Autorest/internal/New-AzDataMigrationToSqlManagedInstance.ps1 b/generated/DataMigration/DataMigration.Autorest/internal/New-AzDataMigrationToSqlManagedInstance.ps1 index bf1073629346..6e7b85e6518e 100644 --- a/generated/DataMigration/DataMigration.Autorest/internal/New-AzDataMigrationToSqlManagedInstance.ps1 +++ b/generated/DataMigration/DataMigration.Autorest/internal/New-AzDataMigrationToSqlManagedInstance.ps1 @@ -23,6 +23,12 @@ Create a new database migration to a given SQL Managed Instance. $sourcePassword = ConvertTo-SecureString -String $password -AsPlainText -Force $filesharePassword = ConvertTo-SecureString -String $password -AsPlainText -Force New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -StorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -StorageAccountKey "aaaaacccccoouunntkkkkeeeyyy" -FileSharePath "\\filesharepath.com\SharedBackup\MyBackUps" -FileShareUsername "filesharepath\User" -FileSharePassword $filesharePassword -SourceSqlConnectionAuthentication "SqlAuthentication" -SourceSqlConnectionDataSource "LabServer.database.net" -SourceSqlConnectionUserName "User" -SourceSqlConnectionPassword $sourcePassword -SourceDatabaseName "AdventureWorks" +.Example +New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -AzureBlobAuthType "ManagedIdentity" -AzureBlobIdentityType "SystemAssigned" -AzureBlobStorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -AzureBlobContainerName "container" +.Example +New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -AzureBlobAuthType "ManagedIdentity" -AzureBlobIdentityType "UserAssigned" -AzureBlobUserAssignedIdentity "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyUserAssignedIdentity" -AzureBlobStorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -AzureBlobContainerName "container" +.Example +New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -AzureBlobStorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -AzureBlobContainerName "container" -AzureBlobAccountKey "accountKey" .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.IDatabaseMigrationSqlMi diff --git a/generated/DataMigration/DataMigration.Autorest/internal/ProxyCmdletDefinitions.ps1 b/generated/DataMigration/DataMigration.Autorest/internal/ProxyCmdletDefinitions.ps1 index 951ca109c1ea..d5f3735fcbe3 100644 --- a/generated/DataMigration/DataMigration.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/DataMigration/DataMigration.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -139,6 +139,12 @@ Create a new database migration to a given SQL Managed Instance. $sourcePassword = ConvertTo-SecureString -String $password -AsPlainText -Force $filesharePassword = ConvertTo-SecureString -String $password -AsPlainText -Force New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -StorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -StorageAccountKey "aaaaacccccoouunntkkkkeeeyyy" -FileSharePath "\\filesharepath.com\SharedBackup\MyBackUps" -FileShareUsername "filesharepath\User" -FileSharePassword $filesharePassword -SourceSqlConnectionAuthentication "SqlAuthentication" -SourceSqlConnectionDataSource "LabServer.database.net" -SourceSqlConnectionUserName "User" -SourceSqlConnectionPassword $sourcePassword -SourceDatabaseName "AdventureWorks" +.Example +New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -AzureBlobAuthType "ManagedIdentity" -AzureBlobIdentityType "SystemAssigned" -AzureBlobStorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -AzureBlobContainerName "container" +.Example +New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -AzureBlobAuthType "ManagedIdentity" -AzureBlobIdentityType "UserAssigned" -AzureBlobUserAssignedIdentity "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyUserAssignedIdentity" -AzureBlobStorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -AzureBlobContainerName "container" +.Example +New-AzDataMigrationToSqlManagedInstance -ResourceGroupName "MyResourceGroup" -ManagedInstanceName "MyManagedInstance" -TargetDbName "MyDb" -Kind "SqlMI" -Scope "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/managedInstances/MyManagedInstance" -MigrationService "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyRG/providers/Microsoft.DataMigration/SqlMigrationServices/MySqlMigrationService" -AzureBlobStorageAccountResourceId "/subscriptions/0000-1111-2222-3333-4444/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/MyStorageAccount" -AzureBlobContainerName "container" -AzureBlobAccountKey "accountKey" .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20250315Preview.IDatabaseMigrationSqlMi diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/Properties/AssemblyInfo.cs b/generated/MobileNetwork/MobileNetwork.Autorest/Properties/AssemblyInfo.cs index 5631e55b9ac6..082ba764f18a 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/Properties/AssemblyInfo.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/Properties/AssemblyInfo.cs @@ -24,4 +24,3 @@ [assembly: System.Reflection.AssemblyVersionAttribute("0.4.2")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] - diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generate-info.json b/generated/MobileNetwork/MobileNetwork.Autorest/generate-info.json index 0ff35be4f6ff..fed0aa6635b2 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generate-info.json +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "f5b92827-b31e-4e69-8360-0abb84f10ef3" + "generate_Id": "e23891c5-7b89-4c35-a048-c4bbec1642e9" } diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkReinstallPacketCoreControlPlane_Reinstall.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkReinstallPacketCoreControlPlane_Reinstall.cs index 8bc997c85372..f44f34d443aa 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkReinstallPacketCoreControlPlane_Reinstall.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkReinstallPacketCoreControlPlane_Reinstall.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Reinstall=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/reinstall" /// [global::System.Management.Automation.Cmdlet("Deploy", @"AzMobileNetworkReinstallPacketCoreControlPlane_Reinstall", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkReinstallPacketCoreControlPlane_ReinstallViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkReinstallPacketCoreControlPlane_ReinstallViaIdentity.cs index 604192e90fea..aae0940acdde 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkReinstallPacketCoreControlPlane_ReinstallViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkReinstallPacketCoreControlPlane_ReinstallViaIdentity.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Reinstall=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/reinstall" /// [global::System.Management.Automation.Cmdlet("Deploy", @"AzMobileNetworkReinstallPacketCoreControlPlane_ReinstallViaIdentity", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Reinstall the specified packet core control plane. This action will remove any transaction state from the packet core to return it to a known state. This action will cause a service outage.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkRollbackPacketCoreControlPlane_Rollback.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkRollbackPacketCoreControlPlane_Rollback.cs index cc1c59331d29..ceaa28559a55 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkRollbackPacketCoreControlPlane_Rollback.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkRollbackPacketCoreControlPlane_Rollback.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Rollback=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback" /// [global::System.Management.Automation.Cmdlet("Deploy", @"AzMobileNetworkRollbackPacketCoreControlPlane_Rollback", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Roll back the specified packet core control plane to the previous version, \""rollbackVersion\"". Multiple consecutive rollbacks are not possible. This action may cause a service outage.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkRollbackPacketCoreControlPlane_RollbackViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkRollbackPacketCoreControlPlane_RollbackViaIdentity.cs index 25c8079f7377..3bbfb4da968d 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkRollbackPacketCoreControlPlane_RollbackViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/DeployAzMobileNetworkRollbackPacketCoreControlPlane_RollbackViaIdentity.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Rollback=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback" /// [global::System.Management.Automation.Cmdlet("Deploy", @"AzMobileNetworkRollbackPacketCoreControlPlane_RollbackViaIdentity", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Roll back the specified packet core control plane to the previous version, \""rollbackVersion\"". Multiple consecutive rollbacks are not possible. This action may cause a service outage.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_Get.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_Get.cs index ad16be9b2d56..b3a77a1b2d70 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_Get.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_Get.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkAttachedDataNetwork_Get")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified attached data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_GetViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_GetViaIdentity.cs index c16c15a8438e..0da2743c49a1 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_GetViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_GetViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkAttachedDataNetwork_GetViaIdentity")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified attached data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_GetViaIdentityPacketCoreControlPlane.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_GetViaIdentityPacketCoreControlPlane.cs index 24a0f6a9830a..d381f057305e 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_GetViaIdentityPacketCoreControlPlane.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_GetViaIdentityPacketCoreControlPlane.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkAttachedDataNetwork_GetViaIdentityPacketCoreControlPlane")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified attached data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_GetViaIdentityPacketCoreDataPlane.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_GetViaIdentityPacketCoreDataPlane.cs index d06c9eca60b5..5119545400ad 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_GetViaIdentityPacketCoreDataPlane.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_GetViaIdentityPacketCoreDataPlane.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkAttachedDataNetwork_GetViaIdentityPacketCoreDataPlane")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified attached data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_List.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_List.cs index 6c6741183411..debc10cfe227 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_List.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkAttachedDataNetwork_List.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListByPacketCoreDataPlane=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkAttachedDataNetwork_List")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets all the attached data networks associated with a packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_Get.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_Get.cs index 57978ff31d0a..b13c0f5b0ba5 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_Get.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_Get.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkDataNetwork_Get")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_GetViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_GetViaIdentity.cs index 99aaffefd288..3559188bb7fd 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_GetViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_GetViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkDataNetwork_GetViaIdentity")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_GetViaIdentityMobileNetwork.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_GetViaIdentityMobileNetwork.cs index 7287fcd722d2..83825e9bd712 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_GetViaIdentityMobileNetwork.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_GetViaIdentityMobileNetwork.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkDataNetwork_GetViaIdentityMobileNetwork")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_List.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_List.cs index 1f67603f077f..f3ea16238c98 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_List.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkDataNetwork_List.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListByMobileNetwork=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkDataNetwork_List")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Lists all data networks in the mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkOperation_List.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkOperation_List.cs index 7eea0129c1d1..1b3767ad22cf 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkOperation_List.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkOperation_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkOperation_List")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets a list of the operations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlaneVersion_Get.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlaneVersion_Get.cs index 3092f7c8ddf3..a5fedf2bd4e7 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlaneVersion_Get.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlaneVersion_Get.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/{versionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkPacketCoreControlPlaneVersion_Get")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreControlPlaneVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified packet core control plane version.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlaneVersion_GetViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlaneVersion_GetViaIdentity.cs index 6ad872e63924..773265ca5bd9 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlaneVersion_GetViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlaneVersion_GetViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions/{versionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkPacketCoreControlPlaneVersion_GetViaIdentity")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreControlPlaneVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified packet core control plane version.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlaneVersion_List.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlaneVersion_List.cs index 168ff476455d..d9ec1be49816 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlaneVersion_List.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlaneVersion_List.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] List=>GET:"/providers/Microsoft.MobileNetwork/packetCoreControlPlaneVersions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkPacketCoreControlPlaneVersion_List")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreControlPlaneVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Lists all supported packet core control planes versions.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_Get.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_Get.cs index 35a0e331c1b1..a64c3e3dcbb4 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_Get.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_Get.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkPacketCoreControlPlane_Get")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreControlPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_GetViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_GetViaIdentity.cs index ff3795fdcb43..a0bdf34904ca 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_GetViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_GetViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkPacketCoreControlPlane_GetViaIdentity")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreControlPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_List.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_List.cs index ad22afba7e4a..78e5786f2ac0 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_List.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_List.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkPacketCoreControlPlane_List")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreControlPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Lists all the packet core control planes in a subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_List1.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_List1.cs index d8156a45e79f..de458bc09cab 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_List1.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreControlPlane_List1.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkPacketCoreControlPlane_List1")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreControlPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Lists all the packet core control planes in a resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_Get.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_Get.cs index e9a4fbaae41d..f9c88889c071 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_Get.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_Get.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkPacketCoreDataPlane_Get")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreDataPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_GetViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_GetViaIdentity.cs index f7caec768110..586900b70b4c 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_GetViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_GetViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkPacketCoreDataPlane_GetViaIdentity")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreDataPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_GetViaIdentityPacketCoreControlPlane.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_GetViaIdentityPacketCoreControlPlane.cs index f25e2927e5a6..e49a4b9183ee 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_GetViaIdentityPacketCoreControlPlane.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_GetViaIdentityPacketCoreControlPlane.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkPacketCoreDataPlane_GetViaIdentityPacketCoreControlPlane")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreDataPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_List.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_List.cs index 3530baf0d052..0ed2120f8b2b 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_List.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkPacketCoreDataPlane_List.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListByPacketCoreControlPlane=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkPacketCoreDataPlane_List")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreDataPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Lists all the packet core data planes associated with a packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_Get.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_Get.cs index 9cb885989c4e..25d57f72f24c 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_Get.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_Get.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkService_Get")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IService))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_GetViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_GetViaIdentity.cs index 104c44d3db3f..16566e414fdb 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_GetViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_GetViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkService_GetViaIdentity")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IService))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_GetViaIdentityMobileNetwork.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_GetViaIdentityMobileNetwork.cs index 5f37ff663b16..20498331e53d 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_GetViaIdentityMobileNetwork.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_GetViaIdentityMobileNetwork.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkService_GetViaIdentityMobileNetwork")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IService))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_List.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_List.cs index 6cc307de410b..a47501e3b18c 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_List.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkService_List.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListByMobileNetwork=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkService_List")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IService))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets all the services in a mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_Get.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_Get.cs index 7866b561b506..2af20a1abad3 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_Get.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_Get.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSimGroup_Get")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_GetViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_GetViaIdentity.cs index d58242b0c43d..a5e3a58bfae2 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_GetViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_GetViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSimGroup_GetViaIdentity")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_List.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_List.cs index 61f1c4d7930f..6a7dfa28368c 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_List.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_List.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/simGroups" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSimGroup_List")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets all the SIM groups in a subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_List1.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_List1.cs index 6face4a76142..94c16b6be5fe 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_List1.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimGroup_List1.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSimGroup_List1")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets all the SIM groups in a resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_Get.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_Get.cs index 91a7b1a1484d..f8d59e4baf09 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_Get.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_Get.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSimPolicy_Get")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified SIM policy.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_GetViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_GetViaIdentity.cs index ccf198adf934..6eb77341207c 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_GetViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_GetViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSimPolicy_GetViaIdentity")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified SIM policy.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_GetViaIdentityMobileNetwork.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_GetViaIdentityMobileNetwork.cs index 56de471dde96..d6b68f088fd3 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_GetViaIdentityMobileNetwork.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_GetViaIdentityMobileNetwork.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSimPolicy_GetViaIdentityMobileNetwork")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified SIM policy.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_List.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_List.cs index 5b230681386b..3397f649361f 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_List.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSimPolicy_List.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListByMobileNetwork=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSimPolicy_List")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets all the SIM policies in a mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_Get.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_Get.cs index 8e06d2b50f3b..8074b37f30ab 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_Get.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_Get.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSim_Get")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISim))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_GetViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_GetViaIdentity.cs index e0e8b63780b7..d741d56da232 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_GetViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_GetViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSim_GetViaIdentity")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISim))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_GetViaIdentitySimGroup.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_GetViaIdentitySimGroup.cs index 9e582ce5aef1..85b3d0f32b9d 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_GetViaIdentitySimGroup.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_GetViaIdentitySimGroup.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSim_GetViaIdentitySimGroup")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISim))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_List.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_List.cs index 0f885c419a82..32010ffde76c 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_List.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSim_List.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListByGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSim_List")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISim))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets all the SIMs in a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_Get.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_Get.cs index e39996dc9e92..15bd0cca37bf 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_Get.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_Get.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSite_Get")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified mobile network site.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_GetViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_GetViaIdentity.cs index abf76e7cda57..e59f22421a5e 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_GetViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_GetViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSite_GetViaIdentity")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified mobile network site.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_GetViaIdentityMobileNetwork.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_GetViaIdentityMobileNetwork.cs index e305ec9dec06..5aacb04dffaf 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_GetViaIdentityMobileNetwork.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_GetViaIdentityMobileNetwork.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSite_GetViaIdentityMobileNetwork")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified mobile network site.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_List.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_List.cs index a082eff2e8cb..ed40717e1608 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_List.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSite_List.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListByMobileNetwork=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSite_List")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Lists all sites in the mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_Get.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_Get.cs index 0df08a12ae2a..cb59a95b73fd 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_Get.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_Get.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSlice_Get")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISlice))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified network slice.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_GetViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_GetViaIdentity.cs index 0043ff87fc82..41e913b7d644 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_GetViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_GetViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSlice_GetViaIdentity")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISlice))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified network slice.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_GetViaIdentityMobileNetwork.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_GetViaIdentityMobileNetwork.cs index d5e1c0581bc9..99fb46019571 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_GetViaIdentityMobileNetwork.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_GetViaIdentityMobileNetwork.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSlice_GetViaIdentityMobileNetwork")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISlice))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified network slice.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_List.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_List.cs index 0836e2d0eed9..d8eb39dfb3fa 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_List.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetworkSlice_List.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListByMobileNetwork=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetworkSlice_List")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISlice))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Lists all slices in the mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_Get.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_Get.cs index 0d5bc7f4b3b4..78320cd2d7a7 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_Get.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_Get.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetwork_Get")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_GetViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_GetViaIdentity.cs index c3b39561b312..618c8d424bb7 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_GetViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_GetViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetwork_GetViaIdentity")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Gets information about the specified mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_List.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_List.cs index d156273ccd63..ed46f2935e1b 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_List.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_List.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/mobileNetworks" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetwork_List")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Lists all the mobile networks in a subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_List1.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_List1.cs index cb7b144ca514..62a9a596abbd 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_List1.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/GetAzMobileNetwork_List1.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMobileNetwork_List1")] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Lists all the mobile networks in a resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateExpanded.cs index c5e40666a008..a545096c7114 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkAttachedDataNetwork_CreateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create an attached data network. Must be created in the same location as its parent packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaIdentityExpanded.cs index 64bb8786fbfc..a8822f100554 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaIdentityExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkAttachedDataNetwork_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create an attached data network. Must be created in the same location as its parent packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaIdentityPacketCoreControlPlaneExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaIdentityPacketCoreControlPlaneExpanded.cs index d7001e7d2a30..6ab8113ce1bf 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaIdentityPacketCoreControlPlaneExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaIdentityPacketCoreControlPlaneExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkAttachedDataNetwork_CreateViaIdentityPacketCoreControlPlaneExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create an attached data network. Must be created in the same location as its parent packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaIdentityPacketCoreDataPlaneExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaIdentityPacketCoreDataPlaneExpanded.cs index 661cfa9ed536..c3291987651c 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaIdentityPacketCoreDataPlaneExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaIdentityPacketCoreDataPlaneExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkAttachedDataNetwork_CreateViaIdentityPacketCoreDataPlaneExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create an attached data network. Must be created in the same location as its parent packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaJsonFilePath.cs index 37953df3cdb7..611f50ea3dcf 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaJsonFilePath.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkAttachedDataNetwork_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create an attached data network. Must be created in the same location as its parent packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaJsonString.cs index 9ad94a950653..fc70ac2ed51f 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkAttachedDataNetwork_CreateViaJsonString.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkAttachedDataNetwork_CreateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create an attached data network. Must be created in the same location as its parent packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateExpanded.cs index 636bac42ebf2..23e508aba8ed 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkDataNetwork_CreateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a data network. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaIdentityExpanded.cs index 2ae2652abe0a..7932503bf869 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaIdentityExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkDataNetwork_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a data network. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaIdentityMobileNetworkExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaIdentityMobileNetworkExpanded.cs index 48e4d9a29323..4315b45851d1 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaIdentityMobileNetworkExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaIdentityMobileNetworkExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkDataNetwork_CreateViaIdentityMobileNetworkExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a data network. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaJsonFilePath.cs index 5952f6296a17..65eb8b38778f 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaJsonFilePath.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkDataNetwork_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a data network. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaJsonString.cs index 480f1eecb66f..06b50eb8ab2c 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkDataNetwork_CreateViaJsonString.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkDataNetwork_CreateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a data network. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateExpanded.cs index 2dafaccfe8ea..0995eec558c2 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkPacketCoreControlPlane_CreateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreControlPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateViaIdentityExpanded.cs index 65586991adc9..6f45c09ec11a 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateViaIdentityExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkPacketCoreControlPlane_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreControlPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateViaJsonFilePath.cs index 142de9acc0da..02ca201adf1c 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateViaJsonFilePath.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkPacketCoreControlPlane_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreControlPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateViaJsonString.cs index c8309494633a..46bf4fe7b122 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreControlPlane_CreateViaJsonString.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkPacketCoreControlPlane_CreateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreControlPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateExpanded.cs index ebf3895c569e..1916d1f8f7ae 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkPacketCoreDataPlane_CreateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreDataPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a packet core data plane. Must be created in the same location as its parent packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaIdentityExpanded.cs index 7be4d5a51824..b8a3a9934e7a 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaIdentityExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkPacketCoreDataPlane_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreDataPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a packet core data plane. Must be created in the same location as its parent packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaIdentityPacketCoreControlPlaneExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaIdentityPacketCoreControlPlaneExpanded.cs index 561747ed78dc..fdd4c3a3bac1 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaIdentityPacketCoreControlPlaneExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaIdentityPacketCoreControlPlaneExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkPacketCoreDataPlane_CreateViaIdentityPacketCoreControlPlaneExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreDataPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a packet core data plane. Must be created in the same location as its parent packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaJsonFilePath.cs index 6a4c09bb7536..642d718906bc 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaJsonFilePath.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkPacketCoreDataPlane_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreDataPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a packet core data plane. Must be created in the same location as its parent packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaJsonString.cs index 2a54c7e68392..848d241c3bd6 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkPacketCoreDataPlane_CreateViaJsonString.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkPacketCoreDataPlane_CreateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreDataPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a packet core data plane. Must be created in the same location as its parent packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateExpanded.cs index bec4f6516532..7a46e2d0f450 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkService_CreateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IService))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a service. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaIdentityExpanded.cs index 7d6836c083eb..73e0a3e13fa2 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaIdentityExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkService_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IService))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a service. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaIdentityMobileNetworkExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaIdentityMobileNetworkExpanded.cs index 09d9a7c79693..1ddb618f1bc2 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaIdentityMobileNetworkExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaIdentityMobileNetworkExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkService_CreateViaIdentityMobileNetworkExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IService))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a service. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaJsonFilePath.cs index 700d5cf49624..99bbecbbbc3a 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaJsonFilePath.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkService_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IService))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a service. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaJsonString.cs index 2b65acb8742f..6eaad9f669f6 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkService_CreateViaJsonString.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkService_CreateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IService))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a service. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateExpanded.cs index dd581802a556..08fc553f057d 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSimGroup_CreateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateViaIdentityExpanded.cs index d137addb2a13..4a56e3a64f42 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateViaIdentityExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSimGroup_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateViaJsonFilePath.cs index 97c2dc95aa35..c8108f15980f 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateViaJsonFilePath.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSimGroup_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateViaJsonString.cs index 8ec18e34cb1a..fbd931b26bae 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimGroup_CreateViaJsonString.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSimGroup_CreateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateExpanded.cs index b02a1e5d6bad..19927bc1f547 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSimPolicy_CreateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM policy. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaIdentityExpanded.cs index d9097c50fcaa..6f2899effff8 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaIdentityExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSimPolicy_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM policy. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaIdentityMobileNetworkExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaIdentityMobileNetworkExpanded.cs index 93223afba63f..33feeff17d01 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaIdentityMobileNetworkExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaIdentityMobileNetworkExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSimPolicy_CreateViaIdentityMobileNetworkExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM policy. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaJsonFilePath.cs index 55bfa53bd224..73b7d4d2a63a 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaJsonFilePath.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSimPolicy_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM policy. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaJsonString.cs index 14b5f72b76d4..ccce3d9d50b6 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSimPolicy_CreateViaJsonString.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSimPolicy_CreateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM policy. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateExpanded.cs index 8789f1b6808a..11eeb561cc2b 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSim_CreateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISim))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaIdentityExpanded.cs index 375cd629aea4..34bf700e7333 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaIdentityExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSim_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISim))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaIdentitySimGroupExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaIdentitySimGroupExpanded.cs index fea04cf9d1a0..02117bf916b8 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaIdentitySimGroupExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaIdentitySimGroupExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSim_CreateViaIdentitySimGroupExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISim))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaJsonFilePath.cs index 6f1d49d57a74..07486fecc4e2 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaJsonFilePath.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSim_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISim))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaJsonString.cs index dc30fd06c7e1..1b6675074bd5 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSim_CreateViaJsonString.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSim_CreateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISim))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateExpanded.cs index a0e6c80b8ff2..4ed25909286e 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSite_CreateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a mobile network site. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaIdentityExpanded.cs index 676d7b3aef34..f55bed9cb39c 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaIdentityExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSite_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a mobile network site. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaIdentityMobileNetworkExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaIdentityMobileNetworkExpanded.cs index ad1616381d15..a59ee36c35ef 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaIdentityMobileNetworkExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaIdentityMobileNetworkExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSite_CreateViaIdentityMobileNetworkExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a mobile network site. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaJsonFilePath.cs index dd20fb09a5fd..fecfec95d6f6 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaJsonFilePath.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSite_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a mobile network site. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaJsonString.cs index 294d3a873ddc..eac00a50cfbc 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSite_CreateViaJsonString.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSite_CreateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a mobile network site. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateExpanded.cs index af7cccebd077..359bf24a7bc9 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSlice_CreateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISlice))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a network slice. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaIdentityExpanded.cs index 0c3bf75172ec..79565cd32a75 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaIdentityExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSlice_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISlice))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a network slice. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaIdentityMobileNetworkExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaIdentityMobileNetworkExpanded.cs index 264c1e3cdc37..6d058b9481d1 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaIdentityMobileNetworkExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaIdentityMobileNetworkExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSlice_CreateViaIdentityMobileNetworkExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISlice))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a network slice. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaJsonFilePath.cs index aa1bda402d04..70363fd513ae 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaJsonFilePath.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSlice_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISlice))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a network slice. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaJsonString.cs index 59b07af0d63a..4b85daba9d04 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetworkSlice_CreateViaJsonString.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSlice_CreateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISlice))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a network slice. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateExpanded.cs index b6fd3ce606fb..95f521adbb23 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetwork_CreateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateViaIdentityExpanded.cs index 92fff653ad44..fd8e254c8678 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateViaIdentityExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetwork_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateViaJsonFilePath.cs index dc6e4d8556a8..303e3accbae6 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateViaJsonFilePath.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetwork_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateViaJsonString.cs index db1ee01a1dad..9385c11ba321 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/NewAzMobileNetwork_CreateViaJsonString.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetwork_CreateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"create a mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_Delete.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_Delete.cs index f537f1a6e964..cc99d6b1b69f 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_Delete.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_Delete.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkAttachedDataNetwork_Delete", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified attached data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_DeleteViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_DeleteViaIdentity.cs index daf9f2d45434..9b69a152c954 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_DeleteViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_DeleteViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkAttachedDataNetwork_DeleteViaIdentity", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified attached data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_DeleteViaIdentityPacketCoreControlPlane.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_DeleteViaIdentityPacketCoreControlPlane.cs index 257b4fb55b59..d9ce2c32fdcc 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_DeleteViaIdentityPacketCoreControlPlane.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_DeleteViaIdentityPacketCoreControlPlane.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkAttachedDataNetwork_DeleteViaIdentityPacketCoreControlPlane", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified attached data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_DeleteViaIdentityPacketCoreDataPlane.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_DeleteViaIdentityPacketCoreDataPlane.cs index 6a66ce6f603b..9777d97d41f7 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_DeleteViaIdentityPacketCoreDataPlane.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkAttachedDataNetwork_DeleteViaIdentityPacketCoreDataPlane.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkAttachedDataNetwork_DeleteViaIdentityPacketCoreDataPlane", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified attached data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkExpanded.cs index 9f8507203cc4..916aeb5120f2 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] BulkDelete=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/deleteSims" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkBulkSimDelete_BulkExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Bulk delete SIMs from a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkViaIdentityExpanded.cs index 8183e100a52d..7839ff2adef1 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkViaIdentityExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] BulkDelete=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/deleteSims" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkBulkSimDelete_BulkViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Bulk delete SIMs from a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkViaJsonFilePath.cs index f534b38237e6..cb25fbaab07f 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkViaJsonFilePath.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] BulkDelete=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/deleteSims" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkBulkSimDelete_BulkViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Bulk delete SIMs from a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkViaJsonString.cs index 121171bc258e..57ac55671c38 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkBulkSimDelete_BulkViaJsonString.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] BulkDelete=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/deleteSims" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkBulkSimDelete_BulkViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Bulk delete SIMs from a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkDataNetwork_Delete.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkDataNetwork_Delete.cs index 80f75bdd44ed..97ad909f389a 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkDataNetwork_Delete.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkDataNetwork_Delete.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkDataNetwork_Delete", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkDataNetwork_DeleteViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkDataNetwork_DeleteViaIdentity.cs index 0c49b9522973..12a4e3ecda86 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkDataNetwork_DeleteViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkDataNetwork_DeleteViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkDataNetwork_DeleteViaIdentity", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkDataNetwork_DeleteViaIdentityMobileNetwork.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkDataNetwork_DeleteViaIdentityMobileNetwork.cs index 1873ff8095d9..fccf9c9fbcef 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkDataNetwork_DeleteViaIdentityMobileNetwork.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkDataNetwork_DeleteViaIdentityMobileNetwork.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkDataNetwork_DeleteViaIdentityMobileNetwork", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified data network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreControlPlane_Delete.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreControlPlane_Delete.cs index ec0f58c62cc8..842b3615b2b8 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreControlPlane_Delete.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreControlPlane_Delete.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkPacketCoreControlPlane_Delete", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreControlPlane_DeleteViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreControlPlane_DeleteViaIdentity.cs index 4f550122fc92..af3ccb180811 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreControlPlane_DeleteViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreControlPlane_DeleteViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkPacketCoreControlPlane_DeleteViaIdentity", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreDataPlane_Delete.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreDataPlane_Delete.cs index b017088ea23f..cfd83c0f2e05 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreDataPlane_Delete.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreDataPlane_Delete.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkPacketCoreDataPlane_Delete", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreDataPlane_DeleteViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreDataPlane_DeleteViaIdentity.cs index ea7cf3c83286..6f3eac3182f5 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreDataPlane_DeleteViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreDataPlane_DeleteViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkPacketCoreDataPlane_DeleteViaIdentity", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreDataPlane_DeleteViaIdentityPacketCoreControlPlane.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreDataPlane_DeleteViaIdentityPacketCoreControlPlane.cs index 80980ece55ac..0e7bb34da5c2 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreDataPlane_DeleteViaIdentityPacketCoreControlPlane.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkPacketCoreDataPlane_DeleteViaIdentityPacketCoreControlPlane.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkPacketCoreDataPlane_DeleteViaIdentityPacketCoreControlPlane", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkService_Delete.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkService_Delete.cs index f99c3248df07..5f8fce730d77 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkService_Delete.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkService_Delete.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkService_Delete", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkService_DeleteViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkService_DeleteViaIdentity.cs index 172fbe363afe..ebb4ddf8c0a1 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkService_DeleteViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkService_DeleteViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkService_DeleteViaIdentity", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkService_DeleteViaIdentityMobileNetwork.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkService_DeleteViaIdentityMobileNetwork.cs index 3fe7d4b2b2ca..e83b125a996d 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkService_DeleteViaIdentityMobileNetwork.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkService_DeleteViaIdentityMobileNetwork.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/services/{serviceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkService_DeleteViaIdentityMobileNetwork", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimGroup_Delete.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimGroup_Delete.cs index dfedaf0eb00f..7e1bf81ff3a4 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimGroup_Delete.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimGroup_Delete.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSimGroup_Delete", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimGroup_DeleteViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimGroup_DeleteViaIdentity.cs index fca181c1b7b8..d96ae734305c 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimGroup_DeleteViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimGroup_DeleteViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSimGroup_DeleteViaIdentity", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimPolicy_Delete.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimPolicy_Delete.cs index 80a6ccd2361b..1a9edc913974 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimPolicy_Delete.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimPolicy_Delete.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSimPolicy_Delete", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified SIM policy.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimPolicy_DeleteViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimPolicy_DeleteViaIdentity.cs index 61712b181a79..fd6c3c9757c7 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimPolicy_DeleteViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimPolicy_DeleteViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSimPolicy_DeleteViaIdentity", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified SIM policy.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimPolicy_DeleteViaIdentityMobileNetwork.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimPolicy_DeleteViaIdentityMobileNetwork.cs index a10bc3a68a0e..9f679656c8f2 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimPolicy_DeleteViaIdentityMobileNetwork.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSimPolicy_DeleteViaIdentityMobileNetwork.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSimPolicy_DeleteViaIdentityMobileNetwork", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified SIM policy.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSim_Delete.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSim_Delete.cs index 3849ff3b4560..3bccd6212a1e 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSim_Delete.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSim_Delete.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSim_Delete", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSim_DeleteViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSim_DeleteViaIdentity.cs index 601b19493bc4..08fb6185eacc 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSim_DeleteViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSim_DeleteViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSim_DeleteViaIdentity", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSim_DeleteViaIdentitySimGroup.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSim_DeleteViaIdentitySimGroup.cs index 9277ecdbe9bf..3be9ec0bd59e 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSim_DeleteViaIdentitySimGroup.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSim_DeleteViaIdentitySimGroup.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSim_DeleteViaIdentitySimGroup", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSite_Delete.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSite_Delete.cs index 08ff2f145207..c35252c42b48 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSite_Delete.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSite_Delete.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSite_Delete", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified mobile network site. This will also delete any network functions that are a part of this site.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSite_DeleteViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSite_DeleteViaIdentity.cs index c7ceddb93b71..88d5c976b3c9 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSite_DeleteViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSite_DeleteViaIdentity.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSite_DeleteViaIdentity", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified mobile network site. This will also delete any network functions that are a part of this site.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSite_DeleteViaIdentityMobileNetwork.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSite_DeleteViaIdentityMobileNetwork.cs index d7f84f370490..177a8670f2a6 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSite_DeleteViaIdentityMobileNetwork.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSite_DeleteViaIdentityMobileNetwork.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSite_DeleteViaIdentityMobileNetwork", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified mobile network site. This will also delete any network functions that are a part of this site.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSlice_Delete.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSlice_Delete.cs index 792b7a42641c..c49819651760 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSlice_Delete.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSlice_Delete.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSlice_Delete", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified network slice.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSlice_DeleteViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSlice_DeleteViaIdentity.cs index 4d162eac9d7b..07dc683d39d4 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSlice_DeleteViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSlice_DeleteViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSlice_DeleteViaIdentity", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified network slice.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSlice_DeleteViaIdentityMobileNetwork.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSlice_DeleteViaIdentityMobileNetwork.cs index de06e487b4ea..65a398bc85c0 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSlice_DeleteViaIdentityMobileNetwork.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetworkSlice_DeleteViaIdentityMobileNetwork.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/slices/{sliceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetworkSlice_DeleteViaIdentityMobileNetwork", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified network slice.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetwork_Delete.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetwork_Delete.cs index 0251dc6787c5..51412edd605a 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetwork_Delete.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetwork_Delete.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetwork_Delete", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetwork_DeleteViaIdentity.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetwork_DeleteViaIdentity.cs index ba2891c4c032..00ab407e5d3e 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetwork_DeleteViaIdentity.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/RemoveAzMobileNetwork_DeleteViaIdentity.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzMobileNetwork_DeleteViaIdentity", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Deletes the specified mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectExpanded.cs index 2cfd76054ff4..8dcff13d85c8 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CollectDiagnosticsPackage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/collectDiagnosticsPackage" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Trace, @"AzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaIdentityExpanded.cs index 37594f0920ae..c01c58accd8a 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaIdentityExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CollectDiagnosticsPackage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/collectDiagnosticsPackage" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Trace, @"AzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaJsonFilePath.cs index 78ab86d19ce0..88a6b6d8bebc 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaJsonFilePath.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CollectDiagnosticsPackage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/collectDiagnosticsPackage" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Trace, @"AzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaJsonString.cs index 8fcb9d359569..d7c12f314938 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/TraceAzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaJsonString.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CollectDiagnosticsPackage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/collectDiagnosticsPackage" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Trace, @"AzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage_CollectViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Collect a diagnostics package for the specified packet core control plane. This action will upload the diagnostics to a storage account.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateExpanded.cs index 6639f0a3d7c0..c3d4e2461909 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkAttachedDataNetwork_UpdateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update an attached data network. Must be created in the same location as its parent packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateViaIdentityExpanded.cs index d1608daad7aa..9ef082a9f8a3 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateViaIdentityExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkAttachedDataNetwork_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update an attached data network. Must be created in the same location as its parent packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateViaIdentityPacketCoreControlPlaneExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateViaIdentityPacketCoreControlPlaneExpanded.cs index 46d75edc64a6..8ffb3935c121 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateViaIdentityPacketCoreControlPlaneExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateViaIdentityPacketCoreControlPlaneExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkAttachedDataNetwork_UpdateViaIdentityPacketCoreControlPlaneExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update an attached data network. Must be created in the same location as its parent packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateViaIdentityPacketCoreDataPlaneExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateViaIdentityPacketCoreDataPlaneExpanded.cs index 06d4a7c03ff9..3d774dc8ebe3 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateViaIdentityPacketCoreDataPlaneExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkAttachedDataNetwork_UpdateViaIdentityPacketCoreDataPlaneExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}/attachedDataNetworks/{attachedDataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkAttachedDataNetwork_UpdateViaIdentityPacketCoreDataPlaneExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAttachedDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update an attached data network. Must be created in the same location as its parent packet core data plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkExpanded.cs index 817f0965784a..c4be4e9bdfc5 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] BulkUploadEncrypted=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadEncryptedSims" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkBulkSimUploadEncrypted_BulkExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkViaIdentityExpanded.cs index 88fef7ee54c4..848fe9ca7d51 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkViaIdentityExpanded.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] BulkUploadEncrypted=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadEncryptedSims" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkBulkSimUploadEncrypted_BulkViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkViaJsonFilePath.cs index d7ca07e5211c..e05a2c19b890 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkViaJsonFilePath.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] BulkUploadEncrypted=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadEncryptedSims" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkBulkSimUploadEncrypted_BulkViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkViaJsonString.cs index b43e9878e360..b84ea76a35f4 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUploadEncrypted_BulkViaJsonString.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] BulkUploadEncrypted=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadEncryptedSims" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkBulkSimUploadEncrypted_BulkViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Bulk upload SIMs in encrypted form to a SIM group. The SIM credentials must be encrypted.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkExpanded.cs index 7e2c1926590a..1b01927cca74 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] BulkUpload=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadSims" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkBulkSimUpload_BulkExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Bulk upload SIMs to a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkViaIdentityExpanded.cs index 0c49d5f9b7b6..cc98d5c8ed67 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkViaIdentityExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] BulkUpload=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadSims" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkBulkSimUpload_BulkViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Bulk upload SIMs to a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkViaJsonFilePath.cs index 149a088f513f..40c5342e1940 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkViaJsonFilePath.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] BulkUpload=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadSims" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkBulkSimUpload_BulkViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Bulk upload SIMs to a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkViaJsonString.cs index 4290fb3bf2be..005a45061241 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkBulkSimUpload_BulkViaJsonString.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] BulkUpload=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/uploadSims" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkBulkSimUpload_BulkViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IAsyncOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Bulk upload SIMs to a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkDataNetwork_UpdateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkDataNetwork_UpdateExpanded.cs index ced70776c089..aa7234b4a7a4 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkDataNetwork_UpdateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkDataNetwork_UpdateExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkDataNetwork_UpdateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a data network. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkDataNetwork_UpdateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkDataNetwork_UpdateViaIdentityExpanded.cs index af6403f8ba5f..b2df16260100 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkDataNetwork_UpdateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkDataNetwork_UpdateViaIdentityExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkDataNetwork_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a data network. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkDataNetwork_UpdateViaIdentityMobileNetworkExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkDataNetwork_UpdateViaIdentityMobileNetworkExpanded.cs index cc4550468a0a..de3db3b3cd20 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkDataNetwork_UpdateViaIdentityMobileNetworkExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkDataNetwork_UpdateViaIdentityMobileNetworkExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/dataNetworks/{dataNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkDataNetwork_UpdateViaIdentityMobileNetworkExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IDataNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a data network. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreControlPlane_UpdateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreControlPlane_UpdateExpanded.cs index 053837903d71..6697bf091896 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreControlPlane_UpdateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreControlPlane_UpdateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkPacketCoreControlPlane_UpdateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreControlPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreControlPlane_UpdateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreControlPlane_UpdateViaIdentityExpanded.cs index daba4184f0a1..60c809515358 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreControlPlane_UpdateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreControlPlane_UpdateViaIdentityExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkPacketCoreControlPlane_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreControlPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreDataPlane_UpdateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreDataPlane_UpdateExpanded.cs index 13406b4064b1..ed9adea80ee6 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreDataPlane_UpdateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreDataPlane_UpdateExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkPacketCoreDataPlane_UpdateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreDataPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a packet core data plane. Must be created in the same location as its parent packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreDataPlane_UpdateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreDataPlane_UpdateViaIdentityExpanded.cs index 49e169cfca13..bc551d7a10c2 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreDataPlane_UpdateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreDataPlane_UpdateViaIdentityExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkPacketCoreDataPlane_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreDataPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a packet core data plane. Must be created in the same location as its parent packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreDataPlane_UpdateViaIdentityPacketCoreControlPlaneExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreDataPlane_UpdateViaIdentityPacketCoreControlPlaneExpanded.cs index c7d630a2e4c5..4aff03e195c3 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreDataPlane_UpdateViaIdentityPacketCoreControlPlaneExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkPacketCoreDataPlane_UpdateViaIdentityPacketCoreControlPlaneExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/packetCoreDataPlanes/{packetCoreDataPlaneName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkPacketCoreDataPlane_UpdateViaIdentityPacketCoreControlPlaneExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IPacketCoreDataPlane))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a packet core data plane. Must be created in the same location as its parent packet core control plane.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkService_UpdateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkService_UpdateExpanded.cs index 18028037c6cc..217384fe86b6 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkService_UpdateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkService_UpdateExpanded.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkService_UpdateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IService))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a service. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkService_UpdateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkService_UpdateViaIdentityExpanded.cs index 3f8885a4248a..b8038540e0bd 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkService_UpdateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkService_UpdateViaIdentityExpanded.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkService_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IService))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a service. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkService_UpdateViaIdentityMobileNetworkExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkService_UpdateViaIdentityMobileNetworkExpanded.cs index 77e0c861f7ee..92fafdda4fc4 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkService_UpdateViaIdentityMobileNetworkExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkService_UpdateViaIdentityMobileNetworkExpanded.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkService_UpdateViaIdentityMobileNetworkExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IService))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a service. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimGroup_UpdateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimGroup_UpdateExpanded.cs index e9d05ce37029..86a7de959b06 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimGroup_UpdateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimGroup_UpdateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSimGroup_UpdateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimGroup_UpdateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimGroup_UpdateViaIdentityExpanded.cs index acd57a4e3297..78053273f77a 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimGroup_UpdateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimGroup_UpdateViaIdentityExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSimGroup_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a SIM group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimPolicy_UpdateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimPolicy_UpdateExpanded.cs index 6ec9831e7813..1d6c168da4dd 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimPolicy_UpdateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimPolicy_UpdateExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSimPolicy_UpdateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a SIM policy. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimPolicy_UpdateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimPolicy_UpdateViaIdentityExpanded.cs index 21f10b68fc72..87d31abfe341 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimPolicy_UpdateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimPolicy_UpdateViaIdentityExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSimPolicy_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a SIM policy. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimPolicy_UpdateViaIdentityMobileNetworkExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimPolicy_UpdateViaIdentityMobileNetworkExpanded.cs index 056b49e73af0..88f58aa4a7ee 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimPolicy_UpdateViaIdentityMobileNetworkExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSimPolicy_UpdateViaIdentityMobileNetworkExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSimPolicy_UpdateViaIdentityMobileNetworkExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISimPolicy))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a SIM policy. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSim_UpdateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSim_UpdateExpanded.cs index 53106252bb7b..9ddf8a828652 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSim_UpdateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSim_UpdateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSim_UpdateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISim))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSim_UpdateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSim_UpdateViaIdentityExpanded.cs index 812a06503e12..4e97c6f1336a 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSim_UpdateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSim_UpdateViaIdentityExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSim_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISim))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSim_UpdateViaIdentitySimGroupExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSim_UpdateViaIdentitySimGroupExpanded.cs index debcb6464ac1..1a14c05873c6 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSim_UpdateViaIdentitySimGroupExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSim_UpdateViaIdentitySimGroupExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/simGroups/{simGroupName}/sims/{simName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSim_UpdateViaIdentitySimGroupExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISim))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a SIM.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateExpanded.cs index ed046e30748d..c0a39b537e1a 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] UpdateTags=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSite_UpdateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update site tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaIdentityExpanded.cs index e54a8846ded0..32292e6390d2 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaIdentityExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] UpdateTags=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSite_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update site tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaIdentityMobileNetworkExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaIdentityMobileNetworkExpanded.cs index a093247498c6..f49d57e23e1b 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaIdentityMobileNetworkExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaIdentityMobileNetworkExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] UpdateTags=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSite_UpdateViaIdentityMobileNetworkExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update site tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaJsonFilePath.cs index e5a71501c676..d20da1e6ead7 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaJsonFilePath.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] UpdateTags=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSite_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update site tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaJsonString.cs index 1d0992612d31..131946060785 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSite_UpdateViaJsonString.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] UpdateTags=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSite_UpdateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update site tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSlice_UpdateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSlice_UpdateExpanded.cs index ee645b048d5b..716c3f3cc9af 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSlice_UpdateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSlice_UpdateExpanded.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSlice_UpdateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISlice))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a network slice. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSlice_UpdateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSlice_UpdateViaIdentityExpanded.cs index ad24fbabadba..5dfa5f15abb6 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSlice_UpdateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSlice_UpdateViaIdentityExpanded.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSlice_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISlice))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a network slice. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSlice_UpdateViaIdentityMobileNetworkExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSlice_UpdateViaIdentityMobileNetworkExpanded.cs index 85721612f48c..4de0ba37662b 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSlice_UpdateViaIdentityMobileNetworkExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetworkSlice_UpdateViaIdentityMobileNetworkExpanded.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetworkSlice_UpdateViaIdentityMobileNetworkExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.ISlice))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update a network slice. Must be created in the same location as its parent mobile network.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateExpanded.cs index 56343139079d..2a849c2a0fd0 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] UpdateTags=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetwork_UpdateExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update mobile network tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateViaIdentityExpanded.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateViaIdentityExpanded.cs index 07c5ac5877c1..befc6875ad9c 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateViaIdentityExpanded.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateViaIdentityExpanded.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] UpdateTags=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetwork_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update mobile network tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateViaJsonFilePath.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateViaJsonFilePath.cs index 56ab5e619fdc..17d3e0cb3781 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateViaJsonFilePath.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateViaJsonFilePath.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] UpdateTags=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetwork_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update mobile network tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateViaJsonString.cs b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateViaJsonString.cs index b64b7e7d3f0f..08c033b1958e 100644 --- a/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateViaJsonString.cs +++ b/generated/MobileNetwork/MobileNetwork.Autorest/generated/cmdlets/UpdateAzMobileNetwork_UpdateViaJsonString.cs @@ -15,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// [OpenAPI] UpdateTags=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzMobileNetwork_UpdateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.CmdletBreakingChange("14.5.0", "0.5.0", "2025/09/30")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetwork))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"update mobile network tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Generated] diff --git a/generated/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.csproj b/generated/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.csproj index ed4ee919c8cc..0680bbda464a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.csproj +++ b/generated/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.csproj @@ -2,9 +2,9 @@ SelfHelp SelfHelp + SelfHelp.Autorest - diff --git a/generated/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.format.ps1xml b/generated/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.format.ps1xml index 0f63c373e470..ab5b56a899f9 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.format.ps1xml +++ b/generated/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.format.ps1xml @@ -2,57 +2,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SelfHelpIdentity + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.AutomatedCheckResult - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SelfHelpIdentity + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.AutomatedCheckResult#Multiple - - - - - - - - - - - - - + - + - + - DiagnosticsResourceName - - - Scope - - - SimplifiedSolutionsResourceName - - - SolutionId - - - SolutionResourceName + Result - SubscriptionId + Status - TroubleshooterName + Version @@ -60,21 +36,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshootersContinueNoContentResponseHeaders + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.CheckNameAvailabilityRequest - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshootersContinueNoContentResponseHeaders + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.CheckNameAvailabilityRequest#Multiple - + - Location + Name @@ -82,21 +58,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshootersEndNoContentResponseHeaders + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.CheckNameAvailabilityResponse - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshootersEndNoContentResponseHeaders + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.CheckNameAvailabilityResponse#Multiple - + + + + + + + - Location + Message + + + NameAvailable + + + Reason @@ -104,21 +92,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.CheckNameAvailabilityRequest + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ClassificationService - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.CheckNameAvailabilityRequest + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ClassificationService#Multiple - + + + + - Name + DisplayName + + + ServiceId @@ -126,33 +120,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ContinueRequestBody - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ContinueRequestBody#Multiple - - - - - - - + - Code - - - Message - - - Target + StepId @@ -160,39 +142,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Operation + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Diagnostic - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Operation + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Diagnostic#Multiple - - - - - - - + - + - ActionType - - - IsDataAction - - - Name + SolutionId - Origin + Status @@ -200,39 +170,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.OperationDisplay + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocation - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.OperationDisplay + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocation#Multiple - - - - - - - - - - + - Description - - - Operation - - - Provider - - - Resource + SolutionId @@ -240,21 +192,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.OperationListResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocationAdditionalParameters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.OperationListResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocationAdditionalParameters#Multiple - + - NextLink + Item @@ -262,9 +214,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ProxyResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ProxyResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResource#Multiple @@ -289,6 +241,9 @@ + + + @@ -314,27 +269,8 @@ SystemDataLastModifiedByType - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource - - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource - - - - - - - - - - - Name + ResourceGroupName @@ -342,51 +278,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemData + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourceProperties - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemData + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourceProperties#Multiple - - - - - - - - - - - - - + - + - CreatedAt - - - CreatedBy - - - CreatedByType - - - LastModifiedAt - - - LastModifiedBy + AcceptedAt - LastModifiedByType + ProvisioningState @@ -394,33 +306,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourcePropertiesGlobalParameters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourcePropertiesGlobalParameters#Multiple - - - - - - - + - Result - - - Status - - - Version + Item @@ -428,51 +328,20 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.CheckNameAvailabilityResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiscoveryNlpRequest - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.CheckNameAvailabilityResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiscoveryNlpRequest#Multiple - - - - + - - - - - - - - Message - - - NameAvailable - - - Reason - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationService - - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationService - - - - - + - + @@ -482,10 +351,13 @@ - DisplayName + AdditionalContext - ResourceType + IssueSummary + + + ResourceId ServiceId @@ -496,21 +368,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ContinueRequestBody + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiscoveryResponse - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ContinueRequestBody + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiscoveryResponse#Multiple - + - StepId + NextLink @@ -518,27 +390,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Diagnostic + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Error - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Diagnostic + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Error#Multiple - + - + - SolutionId + Code - Status + Message @@ -546,43 +418,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocation + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetail - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocation + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetail#Multiple - + - - - - - - SolutionId - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParameters - - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParameters - - - - + + + + - Item + Code + + + Message + + + Target @@ -590,9 +452,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Filter - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Filter#Multiple @@ -600,25 +462,10 @@ - - - - - - - - - - - - - - - - + - + @@ -628,25 +475,10 @@ Name - SystemDataCreatedAt - - - SystemDataCreatedBy - - - SystemDataCreatedByType - - - SystemDataLastModifiedAt - - - SystemDataLastModifiedBy - - - SystemDataLastModifiedByType + Operator - ResourceGroupName + Value @@ -654,27 +486,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Insight - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Insight#Multiple - + - + + + + - AcceptedAt + ImportanceLevel - ProvisioningState + Result + + + Title @@ -682,21 +520,45 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.MetricsBasedChart - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.MetricsBasedChart#Multiple - + + + + + + + + + + + + + - Item + AggregationType + + + Name + + + ReplacementKey + + + TimeSpanDuration + + + Title @@ -704,20 +566,20 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpRequest + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.NlpSolutions - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpRequest + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.NlpSolutions#Multiple - + - + - + @@ -727,13 +589,13 @@ - AdditionalContext + ProblemClassificationId - IssueSummary + ProblemDescription - ResourceId + ProblemTitle ServiceId @@ -744,49 +606,39 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Operation - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Operation#Multiple - + - - - - - - NextLink - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Error - - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Error - - - - + - + + + + - Code + ActionType - Message + IsDataAction + + + Name + + + Origin @@ -794,33 +646,39 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Filter + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.OperationDisplay - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Filter + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.OperationDisplay#Multiple - + - + - + + + + - Name + Description - Operator + Operation - Value + Provider + + + Resource @@ -828,33 +686,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Insight + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.OperationListResult - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Insight + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.OperationListResult#Multiple - - - - - - - + - ImportanceLevel - - - Result - - - Title + NextLink @@ -862,45 +708,57 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChart + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChart + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource#Multiple - + - + - + - + - + + + + + + + - AggregationType + Name - Name + SystemDataCreatedAt - ReplacementKey + SystemDataCreatedBy - TimeSpanDuration + SystemDataCreatedByType - Title + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType @@ -908,39 +766,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutions + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Resource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutions + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Resource#Multiple - - - - - - - - - - + - ProblemClassificationId - - - ProblemDescription - - - ProblemTitle - - - ServiceId + Name @@ -948,9 +788,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseOption + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ResponseOption - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseOption + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ResponseOption#Multiple @@ -976,9 +816,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ResponseValidationProperties - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ResponseValidationProperties#Multiple @@ -1022,9 +862,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.RestartTroubleshooterResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.RestartTroubleshooterResponse - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.RestartTroubleshooterResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.RestartTroubleshooterResponse#Multiple @@ -1050,9 +890,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SearchResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SearchResult - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SearchResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SearchResult#Multiple @@ -1114,9 +954,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Section + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Section - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Section + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Section#Multiple @@ -1142,9 +982,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelp + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SectionSelfHelp - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelp + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SectionSelfHelp#Multiple @@ -1170,9 +1010,67 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SelfHelpIdentity + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SelfHelpIdentity#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DiagnosticsResourceName + + + Scope + + + SimplifiedSolutionsResourceName + + + SolutionId + + + SolutionResourceName + + + SubscriptionId + + + TroubleshooterName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResource#Multiple @@ -1234,9 +1132,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourceProperties - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourceProperties#Multiple @@ -1274,9 +1172,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendix + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesAppendix - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendix + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesAppendix#Multiple @@ -1296,9 +1194,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesParameters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesParameters#Multiple @@ -1318,18 +1216,15 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataProperties - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataProperties#Multiple - - - @@ -1343,9 +1238,6 @@ Description - - RequiredInput - SolutionId @@ -1358,9 +1250,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataResource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataResource#Multiple @@ -1416,9 +1308,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionNlpMetadataResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionNlpMetadataResource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionNlpMetadataResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionNlpMetadataResource#Multiple @@ -1474,9 +1366,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResource#Multiple @@ -1544,9 +1436,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourceProperties - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourceProperties#Multiple @@ -1584,9 +1476,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesParameters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesParameters#Multiple @@ -1606,9 +1498,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceSelfHelp + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourceSelfHelp - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceSelfHelp + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourceSelfHelp#Multiple @@ -1670,9 +1562,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnostic + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsDiagnostic - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnostic + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsDiagnostic#Multiple @@ -1682,9 +1574,6 @@ - - - @@ -1704,9 +1593,6 @@ ReplacementKey - - RequiredParameter - SolutionId @@ -1722,9 +1608,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelp + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsResourcePropertiesSelfHelp - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelp + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsResourcePropertiesSelfHelp#Multiple @@ -1756,9 +1642,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshooters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTroubleshooters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshooters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTroubleshooters#Multiple @@ -1790,9 +1676,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBodyParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionWarmUpRequestBodyParameters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBodyParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionWarmUpRequestBodyParameters#Multiple @@ -1812,9 +1698,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Step + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Step - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Step + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Step#Multiple @@ -1864,9 +1750,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepInput + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.StepInput - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepInput + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.StepInput#Multiple @@ -1928,9 +1814,61 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterion + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemData + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemData#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + CreatedAt + + + CreatedBy + + + CreatedByType + + + LastModifiedAt + + + LastModifiedBy + + + LastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TriggerCriterion - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterion + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TriggerCriterion#Multiple @@ -1956,9 +1894,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstanceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstanceProperties - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstanceProperties + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstanceProperties#Multiple @@ -1984,9 +1922,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstancePropertiesParameters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParameters + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstancePropertiesParameters#Multiple @@ -2006,9 +1944,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResource#Multiple @@ -2070,9 +2008,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResponse - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResponse + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResponse#Multiple @@ -2104,9 +2042,53 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Video + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshootersContinueNoContentResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshootersContinueNoContentResponseHeaders#Multiple + + + + + + + + + + + + Location + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshootersEndNoContentResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshootersEndNoContentResponseHeaders#Multiple + + + + + + + + + + + + Location + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Video - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Video + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Video#Multiple @@ -2138,9 +2120,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroup + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroup - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroup + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroup#Multiple @@ -2160,9 +2142,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideo + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupVideo - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideo + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupVideo#Multiple @@ -2188,9 +2170,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResult - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResult + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResult#Multiple diff --git a/generated/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.psd1 b/generated/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.psd1 index 5114f71871d7..297dee33d514 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.psd1 +++ b/generated/SelfHelp/SelfHelp.Autorest/Az.SelfHelp.psd1 @@ -11,8 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.SelfHelp.private.dll' FormatsToProcess = './Az.SelfHelp.format.ps1xml' - FunctionsToExport = 'Get-AzSelfHelpDiagnostic', 'Get-AzSelfHelpDiscoverySolution', 'Get-AzSelfHelpSimplifiedSolution', 'Get-AzSelfHelpSolution', 'Get-AzSelfHelpSolutionSelfHelp', 'Get-AzSelfHelpTroubleshooter', 'Invoke-AzSelfHelpCheckNameAvailability', 'Invoke-AzSelfHelpContinueTroubleshooter', 'Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope', 'Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope', 'Invoke-AzSelfHelpWarmSolutionUp', 'New-AzSelfHelpDiagnostic', 'New-AzSelfHelpSimplifiedSolution', 'New-AzSelfHelpSolution', 'New-AzSelfHelpTroubleshooter', 'Restart-AzSelfHelpTroubleshooter', 'Stop-AzSelfHelpTroubleshooter', 'Update-AzSelfHelpSolution', '*' - AliasesToExport = '*' + FunctionsToExport = 'Get-AzSelfHelpDiagnostic', 'Get-AzSelfHelpDiscoverySolution', 'Get-AzSelfHelpSimplifiedSolution', 'Get-AzSelfHelpSolution', 'Get-AzSelfHelpSolutionSelfHelp', 'Get-AzSelfHelpTroubleshooter', 'Invoke-AzSelfHelpCheckNameAvailability', 'Invoke-AzSelfHelpContinueTroubleshooter', 'Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope', 'Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope', 'Invoke-AzSelfHelpWarmSolutionUp', 'New-AzSelfHelpDiagnostic', 'New-AzSelfHelpSimplifiedSolution', 'New-AzSelfHelpSolution', 'New-AzSelfHelpTroubleshooter', 'Restart-AzSelfHelpTroubleshooter', 'Stop-AzSelfHelpTroubleshooter', 'Update-AzSelfHelpSolution' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'SelfHelp' diff --git a/generated/SelfHelp/SelfHelp.Autorest/Properties/AssemblyInfo.cs b/generated/SelfHelp/SelfHelp.Autorest/Properties/AssemblyInfo.cs index 2b5f2efbee5d..2aaa55258b53 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/Properties/AssemblyInfo.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/Properties/AssemblyInfo.cs @@ -1,28 +1,26 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the Apache License, Version 2.0 (the ""License""); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, +// distributed under the License is distributed on an ""AS IS"" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// ---------------------------------------------------------------------------------- +// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +// is regenerated. using System; using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -[assembly: AssemblyTitle("Microsoft Azure Powershell - SelfHelp")] -[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] -[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] -[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] - -[assembly: ComVisible(false)] -[assembly: CLSCompliant(false)] -[assembly: Guid("e1744ee7-2ebf-4e28-aa4b-8e6bce9d10b0")] -[assembly: AssemblyVersion("0.2.1")] -[assembly: AssemblyFileVersion("0.2.1")] +[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")] +[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] +[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] +[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - SelfHelp")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("0.2.1")] +[assembly: System.Reflection.AssemblyVersionAttribute("0.2.1")] +[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] +[assembly: System.CLSCompliantAttribute(false)] diff --git a/generated/SelfHelp/SelfHelp.Autorest/check-dependencies.ps1 b/generated/SelfHelp/SelfHelp.Autorest/check-dependencies.ps1 index c29591c7bfe1..90ca9867ae40 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/check-dependencies.ps1 +++ b/generated/SelfHelp/SelfHelp.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/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiagnostic.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiagnostic.ps1 index e27c94e65f26..6e147bf46149 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiagnostic.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiagnostic.ps1 @@ -25,7 +25,7 @@ Get the diagnostics using the 'diagnosticsResourceName' you chose while creating .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource .Notes COMPLEX PARAMETER PROPERTIES @@ -44,7 +44,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiagnostic #> function Get-AzSelfHelpDiagnostic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -64,7 +64,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -123,6 +122,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -152,6 +160,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/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiscoverySolution.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiscoverySolution.ps1 index 4f4fa428d851..258b64f5d26f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiscoverySolution.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpDiscoverySolution.ps1 @@ -25,12 +25,12 @@ Lists the relevant Azure diagnostics and solutions using [problemClassification Get-AzSelfHelpDiscoverySolution -Filter "ProblemClassificationId eq 'a5db90c3-f147-bce6-83b0-ab5e0aeca1f0'" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource .Link https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiscoverysolution #> function Get-AzSelfHelpDiscoverySolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -104,6 +104,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -132,6 +141,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/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSimplifiedSolution.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSimplifiedSolution.ps1 index 8f70816bb6f1..0d5af46a0f3d 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSimplifiedSolution.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSimplifiedSolution.ps1 @@ -27,7 +27,7 @@ Get-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3- .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource .Notes COMPLEX PARAMETER PROPERTIES @@ -46,7 +46,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsimplifiedsolution #> function Get-AzSelfHelpSimplifiedSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -66,7 +66,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -125,6 +124,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -154,6 +162,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/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolution.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolution.ps1 index f9c345981870..51f602ba0e54 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolution.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolution.ps1 @@ -25,7 +25,7 @@ Get-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bd .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource .Notes COMPLEX PARAMETER PROPERTIES @@ -44,7 +44,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolution #> function Get-AzSelfHelpSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -64,7 +64,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -123,6 +122,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -152,6 +160,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/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolutionSelfHelp.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolutionSelfHelp.ps1 index d43058c97c3d..165ecc140c78 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolutionSelfHelp.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpSolutionSelfHelp.ps1 @@ -27,7 +27,7 @@ Get-AzSelfHelpSolutionSelfHelp -SolutionId "apollo-48996ff7-002f-47c1-85b2-df138 .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp .Notes COMPLEX PARAMETER PROPERTIES @@ -46,7 +46,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolutionselfhelp #> function Get-AzSelfHelpSolutionSelfHelp { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -60,7 +60,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -119,6 +118,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -148,6 +156,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/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpTroubleshooter.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpTroubleshooter.ps1 index dff25b201e04..e7397a6474fa 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpTroubleshooter.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Get-AzSelfHelpTroubleshooter.ps1 @@ -17,17 +17,17 @@ <# .Synopsis Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. -This API requires the Troubleshooter resource name that was created using the Create API. +This API requires the Troubleshooter resource name that was created using the get API. .Description Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. -This API requires the Troubleshooter resource name that was created using the Create API. +This API requires the Troubleshooter resource name that was created using the get API. .Example Get-AzSelfHelpTroubleshooter -Scope "/subscriptions/" -Name "02d59989-f8a9-4b69-9919-1ef51df4eff6" .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource .Notes COMPLEX PARAMETER PROPERTIES @@ -46,7 +46,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelptroubleshooter #> function Get-AzSelfHelpTroubleshooter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -66,7 +66,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -125,6 +124,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -154,6 +162,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/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpCheckNameAvailability.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpCheckNameAvailability.ps1 index 858cbb1271b1..a262ccfdd55c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpCheckNameAvailability.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpCheckNameAvailability.ps1 @@ -28,11 +28,9 @@ $CHECKNAMEAVAILABILITYREQUEST = [ordered]@{ Invoke-AzSelfHelpCheckNameAvailability -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -CheckNameAvailabilityRequest $CHECKNAMEAVAILABILITYREQUEST .Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse .Notes COMPLEX PARAMETER PROPERTIES @@ -41,60 +39,49 @@ To create the parameters described below, construct a hash table containing the CHECKNAMEAVAILABILITYREQUEST : The check availability request body. [Name ]: The name of the resource for which availability needs to be checked. [Type ]: The resource type. - -INPUTOBJECT : Identity Parameter - [DiagnosticsResourceName ]: Unique resource name for insight resources - [Id ]: Resource identity path - [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read - [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. - [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP - [SolutionResourceName ]: Solution resource Name. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpchecknameavailability #> function Invoke-AzSelfHelpCheckNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse])] [CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Post', Mandatory)] - [Parameter(ParameterSetName='PostExpanded', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, - [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest] # The check availability request body. - # To construct, see NOTES section for CHECKNAMEAVAILABILITYREQUEST properties and create a hash table. ${CheckNameAvailabilityRequest}, [Parameter(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # The name of the resource for which availability needs to be checked. ${Name}, [Parameter(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # The resource type. ${Type}, + [Parameter(ParameterSetName='PostViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Post operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='PostViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Post operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -151,6 +138,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -172,8 +168,8 @@ begin { $mapping = @{ Post = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_Post'; PostExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostExpanded'; - PostViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostViaIdentity'; - PostViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostViaIdentityExpanded'; + PostViaJsonFilePath = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostViaJsonFilePath'; + PostViaJsonString = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -182,6 +178,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/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpContinueTroubleshooter.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpContinueTroubleshooter.ps1 index 6a1093de1e09..32d4e32e5aea 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpContinueTroubleshooter.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpContinueTroubleshooter.ps1 @@ -18,11 +18,11 @@ .Synopsis Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. -This API is used after the Troubleshooter has been created using the Create API. +This API is used after the Troubleshooter has been created using the continue API. .Description Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. -This API is used after the Troubleshooter has been created using the Create API. +This API is used after the Troubleshooter has been created using the continue API. .Example $continueRequest = [ordered]@{ "StepId" ="15ebac6c-96a1-4a67-ae9d-b06011d232ff" @@ -31,7 +31,7 @@ $continueRequest = [ordered]@{ Invoke-AzSelfHelpContinueTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -TroubleshooterName "02d59989-f8a9-4b69-9919-1ef51df4eff6" -ContinueRequestBody $continueRequest .Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs @@ -42,9 +42,9 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. CONTINUEREQUESTBODY : Troubleshooter ContinueRequest body. - [Response ]: + [Response >]: [QuestionId ]: id of the question. - [QuestionType ]: Type of Question + [QuestionType ]: Type of Question [Response ]: Response key for SingleInput. For Multi-line test/open ended question it is free form text [StepId ]: Unique id of the result. @@ -60,7 +60,7 @@ INPUTOBJECT : Identity Parameter RESPONSE : . [QuestionId ]: id of the question. - [QuestionType ]: Type of Question + [QuestionType ]: Type of Question [Response ]: Response key for SingleInput. For Multi-line test/open ended question it is free form text .Link https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpcontinuetroubleshooter @@ -71,6 +71,8 @@ function Invoke-AzSelfHelpContinueTroubleshooter { param( [Parameter(ParameterSetName='Continue', Mandatory)] [Parameter(ParameterSetName='ContinueExpanded', Mandatory)] + [Parameter(ParameterSetName='ContinueViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='ContinueViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read @@ -78,6 +80,8 @@ param( [Parameter(ParameterSetName='Continue', Mandatory)] [Parameter(ParameterSetName='ContinueExpanded', Mandatory)] + [Parameter(ParameterSetName='ContinueViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='ContinueViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # Troubleshooter resource Name. @@ -88,24 +92,21 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='Continue', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='ContinueViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody] # Troubleshooter ContinueRequest body. - # To construct, see NOTES section for CONTINUEREQUESTBODY properties and create a hash table. ${ContinueRequestBody}, [Parameter(ParameterSetName='ContinueExpanded')] [Parameter(ParameterSetName='ContinueViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse[]] # . - # To construct, see NOTES section for RESPONSE properties and create a hash table. ${Response}, [Parameter(ParameterSetName='ContinueExpanded')] @@ -115,6 +116,18 @@ param( # Unique id of the result. ${StepId}, + [Parameter(ParameterSetName='ContinueViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Continue operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='ContinueViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Continue operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -177,6 +190,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -200,6 +222,8 @@ begin { ContinueExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueExpanded'; ContinueViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueViaIdentity'; ContinueViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded'; + ContinueViaJsonFilePath = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueViaJsonFilePath'; + ContinueViaJsonString = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -208,6 +232,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/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.ps1 index 782b65b93339..bd0bc3e87a70 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.ps1 @@ -23,11 +23,9 @@ Solution discovery using natural language processing. Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -SubscriptionId "6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -IssueSummary "Billing Issues" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse .Notes COMPLEX PARAMETER PROPERTIES @@ -38,25 +36,14 @@ DISCOVERSOLUTIONREQUEST : Discover NLP request. [IssueSummary ]: Describe the issue with the affected resource. [ResourceId ]: Provide resourceId of affected resource [ServiceId ]: Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response - -INPUTOBJECT : Identity Parameter - [DiagnosticsResourceName ]: Unique resource name for insight resources - [Id ]: Resource identity path - [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read - [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. - [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP - [SolutionResourceName ]: Solution resource Name. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpdiscoverysolutionnlpsubscriptionscope #> function Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse])] [CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Post')] - [Parameter(ParameterSetName='PostExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -64,51 +51,49 @@ param( # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest] # Discover NLP request. - # To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. ${DiscoverSolutionRequest}, [Parameter(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Additional information in the form of a string. ${AdditionalContext}, [Parameter(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Describe the issue with the affected resource. ${IssueSummary}, [Parameter(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Provide resourceId of affected resource ${ResourceId}, [Parameter(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Service Classification id for the resource. - # You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response + # You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response ${ServiceId}, + [Parameter(ParameterSetName='PostViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Post operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='PostViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Post operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -165,6 +150,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -186,12 +180,10 @@ begin { $mapping = @{ Post = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post'; PostExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded'; - PostViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity'; - PostViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded'; + PostViaJsonFilePath = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonFilePath'; + PostViaJsonString = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonString'; } - if (('Post', 'PostExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Post', 'PostExpanded', 'PostViaJsonFilePath', 'PostViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -205,6 +197,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/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.ps1 index 8c6b809ce22c..9eaf124ce605 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.ps1 @@ -23,9 +23,9 @@ Solution discovery using natural language processing. Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -IssueSummary "Billing Issues" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse .Notes COMPLEX PARAMETER PROPERTIES @@ -40,14 +40,13 @@ DISCOVERSOLUTIONREQUEST : Discover NLP request. https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpdiscoverysolutionnlptenantscope #> function Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse])] [CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest] # Discover NLP request. - # To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. ${DiscoverSolutionRequest}, [Parameter(ParameterSetName='PostExpanded')] @@ -72,9 +71,21 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Service Classification id for the resource. - # You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response + # You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response ${ServiceId}, + [Parameter(ParameterSetName='PostViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Post operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='PostViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Post operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -131,6 +142,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -152,6 +172,8 @@ begin { $mapping = @{ Post = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope_Post'; PostExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded'; + PostViaJsonFilePath = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonFilePath'; + PostViaJsonString = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -160,6 +182,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpWarmSolutionUp.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpWarmSolutionUp.ps1 index 35e094517f49..1c27efdc358e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpWarmSolutionUp.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Invoke-AzSelfHelpWarmSolutionUp.ps1 @@ -26,10 +26,10 @@ $parameters = [ordered]@{ } Invoke-AzSelfHelpWarmSolutionUp -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SolutionResourceName $resourceName -Parameter $parameters -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody .Outputs System.Boolean .Notes @@ -59,6 +59,8 @@ function Invoke-AzSelfHelpWarmSolutionUp { param( [Parameter(ParameterSetName='Warm', Mandatory)] [Parameter(ParameterSetName='WarmExpanded', Mandatory)] + [Parameter(ParameterSetName='WarmViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='WarmViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read @@ -66,6 +68,8 @@ param( [Parameter(ParameterSetName='Warm', Mandatory)] [Parameter(ParameterSetName='WarmExpanded', Mandatory)] + [Parameter(ParameterSetName='WarmViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='WarmViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # Solution resource Name. @@ -76,25 +80,35 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='Warm', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='WarmViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody] # Solution WarmUpRequest body - # To construct, see NOTES section for SOLUTIONWARMUPREQUESTBODY properties and create a hash table. ${SolutionWarmUpRequestBody}, [Parameter(ParameterSetName='WarmExpanded')] [Parameter(ParameterSetName='WarmViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters]))] [System.Collections.Hashtable] # Dictionary of ${Parameter}, + [Parameter(ParameterSetName='WarmViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Warm operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='WarmViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Warm operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -157,6 +171,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -180,6 +203,8 @@ begin { WarmExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmExpanded'; WarmViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmViaIdentity'; WarmViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded'; + WarmViaJsonFilePath = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmViaJsonFilePath'; + WarmViaJsonString = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -188,6 +213,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/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpDiagnostic.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpDiagnostic.ps1 index 85467964f833..8c5516ca0301 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpDiagnostic.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpDiagnostic.ps1 @@ -16,10 +16,10 @@ <# .Synopsis -Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. .Description -Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. .Example $insightsToInvoke = [ordered]@{ @@ -27,13 +27,25 @@ $insightsToInvoke = [ordered]@{ } New-AzSelfHelpDiagnostic -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aravind-test-resources/providers/Microsoft.KeyVault/vaults/ab-tests-kv-an" -SResourceName ab-test-973 -Insight $insightsToInvoke +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +INPUTOBJECT : Identity Parameter + [DiagnosticsResourceName ]: Unique resource name for insight resources + [Id ]: Resource identity path + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. + INSIGHT : SolutionIds that are needed to be invoked. [AdditionalParameter ]: Additional parameters required to invoke the solutionId. [(Any) ]: This indicates any property can be added to this object. @@ -42,37 +54,60 @@ INSIGHT : SolutionIds that are needed to be invoked. https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpdiagnostic #> function New-AzSelfHelpDiagnostic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('DiagnosticsResourceName')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # Unique resource name for insight resources ${SResourceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters]))] [System.Collections.Hashtable] # Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results ${GlobalParameter}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation[]] # SolutionIds that are needed to be invoked. - # To construct, see NOTES section for INSIGHT properties and create a hash table. ${Insight}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -141,6 +176,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -161,6 +205,9 @@ begin { $mapping = @{ CreateExpanded = 'Az.SelfHelp.private\New-AzSelfHelpDiagnostic_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.SelfHelp.private\New-AzSelfHelpDiagnostic_CreateViaIdentityExpanded'; + CreateViaJsonFilePath = 'Az.SelfHelp.private\New-AzSelfHelpDiagnostic_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.SelfHelp.private\New-AzSelfHelpDiagnostic_CreateViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -169,6 +216,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/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSimplifiedSolution.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSimplifiedSolution.ps1 index 4d7fc14a720b..05882d89c11a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSimplifiedSolution.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSimplifiedSolution.ps1 @@ -16,13 +16,13 @@ <# .Synopsis -Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +create a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response.

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

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API. @@ -36,41 +36,81 @@ $parameters = [ordered]@{ } New-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SResourceName $resourceName -SolutionId $solutionId -Parameter $parameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [DiagnosticsResourceName ]: Unique resource name for insight resources + [Id ]: Resource identity path + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpsimplifiedsolution #> function New-AzSelfHelpSimplifiedSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('SimplifiedSolutionsResourceName')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # Simplified Solutions Resource Name. ${SResourceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Simplified Solutions ${Parameter}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Solution Id to identify single Simplified Solution. ${SolutionId}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -139,6 +179,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -159,6 +208,9 @@ begin { $mapping = @{ CreateExpanded = 'Az.SelfHelp.private\New-AzSelfHelpSimplifiedSolution_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.SelfHelp.private\New-AzSelfHelpSimplifiedSolution_CreateViaIdentityExpanded'; + CreateViaJsonFilePath = 'Az.SelfHelp.private\New-AzSelfHelpSimplifiedSolution_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.SelfHelp.private\New-AzSelfHelpSimplifiedSolution_CreateViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -167,6 +219,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSolution.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSolution.ps1 index f0bada7812b6..2587289a1f80 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSolution.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpSolution.ps1 @@ -16,7 +16,7 @@ <# .Synopsis -Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. @@ -28,7 +28,7 @@ In the absence of the ‘requiredParameters’ it is likely that some of the sol ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters .Description -Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. @@ -51,51 +51,86 @@ $parameters = [ordered]@{ New-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +INPUTOBJECT : Identity Parameter + [DiagnosticsResourceName ]: Unique resource name for insight resources + [Id ]: Resource identity path + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. + TRIGGERCRITERION : Solution request trigger criteria - [Name ]: Trigger criterion name. + [Name ]: Trigger criterion name. [Value ]: Trigger criterion value. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpsolution #> function New-AzSelfHelpSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('SolutionResourceName')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # Solution resource Name. ${ResourceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Solution ${Parameter}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion[]] # Solution request trigger criteria - # To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ${TriggerCriterion}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -164,6 +199,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -184,6 +228,9 @@ begin { $mapping = @{ CreateExpanded = 'Az.SelfHelp.private\New-AzSelfHelpSolution_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.SelfHelp.private\New-AzSelfHelpSolution_CreateViaIdentityExpanded'; + CreateViaJsonFilePath = 'Az.SelfHelp.private\New-AzSelfHelpSolution_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.SelfHelp.private\New-AzSelfHelpSolution_CreateViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -192,6 +239,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/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpTroubleshooter.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpTroubleshooter.ps1 index 4e283c4ad623..4432e3f0f701 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpTroubleshooter.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/New-AzSelfHelpTroubleshooter.ps1 @@ -16,13 +16,13 @@ <# .Synopsis -Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. +create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections. .Description -Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. +create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. @@ -35,41 +35,81 @@ $parameters = [ordered]@{ New-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a 6af-43e1-96d3-bf71f6f5f8ba" -Name "12d59989-f8a9-4b69-9919-1ef51df4eff6" -Parameter $parameters -SolutionId "e104dbdf-9e14-4c9f-bc78-21ac90382231" +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [DiagnosticsResourceName ]: Unique resource name for insight resources + [Id ]: Resource identity path + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelptroubleshooter #> function New-AzSelfHelpTroubleshooter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('TroubleshooterName')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # Troubleshooter resource Name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Troubleshooter Resource ${Parameter}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Solution Id to identify single troubleshooter. ${SolutionId}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -126,6 +166,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -146,6 +195,9 @@ begin { $mapping = @{ CreateExpanded = 'Az.SelfHelp.private\New-AzSelfHelpTroubleshooter_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.SelfHelp.private\New-AzSelfHelpTroubleshooter_CreateViaIdentityExpanded'; + CreateViaJsonFilePath = 'Az.SelfHelp.private\New-AzSelfHelpTroubleshooter_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.SelfHelp.private\New-AzSelfHelpTroubleshooter_CreateViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -154,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/SelfHelp/SelfHelp.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/ProxyCmdletDefinitions.ps1 index 4454294a7ee2..bbdf7e9e3c9b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -25,7 +25,7 @@ Get the diagnostics using the 'diagnosticsResourceName' you chose while creating .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource .Notes COMPLEX PARAMETER PROPERTIES @@ -44,7 +44,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiagnostic #> function Get-AzSelfHelpDiagnostic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -64,7 +64,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -123,6 +122,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -152,6 +160,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) @@ -206,12 +217,12 @@ Lists the relevant Azure diagnostics and solutions using [problemClassification Get-AzSelfHelpDiscoverySolution -Filter "ProblemClassificationId eq 'a5db90c3-f147-bce6-83b0-ab5e0aeca1f0'" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource .Link https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpdiscoverysolution #> function Get-AzSelfHelpDiscoverySolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -285,6 +296,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -313,6 +333,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) @@ -369,7 +392,7 @@ Get-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3- .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource .Notes COMPLEX PARAMETER PROPERTIES @@ -388,7 +411,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsimplifiedsolution #> function Get-AzSelfHelpSimplifiedSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -408,7 +431,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -467,6 +489,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -496,6 +527,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) @@ -552,7 +586,7 @@ Get-AzSelfHelpSolutionSelfHelp -SolutionId "apollo-48996ff7-002f-47c1-85b2-df138 .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp .Notes COMPLEX PARAMETER PROPERTIES @@ -571,7 +605,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolutionselfhelp #> function Get-AzSelfHelpSolutionSelfHelp { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -585,7 +619,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -644,6 +677,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -673,6 +715,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) @@ -727,7 +772,7 @@ Get-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bd .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource .Notes COMPLEX PARAMETER PROPERTIES @@ -746,7 +791,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpsolution #> function Get-AzSelfHelpSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -766,7 +811,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -825,6 +869,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -854,6 +907,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) @@ -900,17 +956,17 @@ end { <# .Synopsis Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. -This API requires the Troubleshooter resource name that was created using the Create API. +This API requires the Troubleshooter resource name that was created using the get API. .Description Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. -This API requires the Troubleshooter resource name that was created using the Create API. +This API requires the Troubleshooter resource name that was created using the get API. .Example Get-AzSelfHelpTroubleshooter -Scope "/subscriptions/" -Name "02d59989-f8a9-4b69-9919-1ef51df4eff6" .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource .Notes COMPLEX PARAMETER PROPERTIES @@ -929,7 +985,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelptroubleshooter #> function Get-AzSelfHelpTroubleshooter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -949,7 +1005,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -1008,6 +1063,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -1037,6 +1101,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) @@ -1094,11 +1161,9 @@ $CHECKNAMEAVAILABILITYREQUEST = [ordered]@{ Invoke-AzSelfHelpCheckNameAvailability -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -CheckNameAvailabilityRequest $CHECKNAMEAVAILABILITYREQUEST .Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse .Notes COMPLEX PARAMETER PROPERTIES @@ -1107,60 +1172,49 @@ To create the parameters described below, construct a hash table containing the CHECKNAMEAVAILABILITYREQUEST : The check availability request body. [Name ]: The name of the resource for which availability needs to be checked. [Type ]: The resource type. - -INPUTOBJECT : Identity Parameter - [DiagnosticsResourceName ]: Unique resource name for insight resources - [Id ]: Resource identity path - [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read - [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. - [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP - [SolutionResourceName ]: Solution resource Name. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpchecknameavailability #> function Invoke-AzSelfHelpCheckNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse])] [CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Post', Mandatory)] - [Parameter(ParameterSetName='PostExpanded', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, - [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest] # The check availability request body. - # To construct, see NOTES section for CHECKNAMEAVAILABILITYREQUEST properties and create a hash table. ${CheckNameAvailabilityRequest}, [Parameter(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # The name of the resource for which availability needs to be checked. ${Name}, [Parameter(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # The resource type. ${Type}, + [Parameter(ParameterSetName='PostViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Post operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='PostViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Post operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1217,6 +1271,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -1238,8 +1301,8 @@ begin { $mapping = @{ Post = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_Post'; PostExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostExpanded'; - PostViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostViaIdentity'; - PostViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostViaIdentityExpanded'; + PostViaJsonFilePath = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostViaJsonFilePath'; + PostViaJsonString = 'Az.SelfHelp.private\Invoke-AzSelfHelpCheckNameAvailability_PostViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1248,6 +1311,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) @@ -1295,11 +1361,11 @@ end { .Synopsis Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. -This API is used after the Troubleshooter has been created using the Create API. +This API is used after the Troubleshooter has been created using the continue API. .Description Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. -This API is used after the Troubleshooter has been created using the Create API. +This API is used after the Troubleshooter has been created using the continue API. .Example $continueRequest = [ordered]@{ "StepId" ="15ebac6c-96a1-4a67-ae9d-b06011d232ff" @@ -1308,7 +1374,7 @@ $continueRequest = [ordered]@{ Invoke-AzSelfHelpContinueTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -TroubleshooterName "02d59989-f8a9-4b69-9919-1ef51df4eff6" -ContinueRequestBody $continueRequest .Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs @@ -1319,9 +1385,9 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. CONTINUEREQUESTBODY : Troubleshooter ContinueRequest body. - [Response ]: + [Response >]: [QuestionId ]: id of the question. - [QuestionType ]: Type of Question + [QuestionType ]: Type of Question [Response ]: Response key for SingleInput. For Multi-line test/open ended question it is free form text [StepId ]: Unique id of the result. @@ -1337,7 +1403,7 @@ INPUTOBJECT : Identity Parameter RESPONSE : . [QuestionId ]: id of the question. - [QuestionType ]: Type of Question + [QuestionType ]: Type of Question [Response ]: Response key for SingleInput. For Multi-line test/open ended question it is free form text .Link https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpcontinuetroubleshooter @@ -1348,6 +1414,8 @@ function Invoke-AzSelfHelpContinueTroubleshooter { param( [Parameter(ParameterSetName='Continue', Mandatory)] [Parameter(ParameterSetName='ContinueExpanded', Mandatory)] + [Parameter(ParameterSetName='ContinueViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='ContinueViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read @@ -1355,6 +1423,8 @@ param( [Parameter(ParameterSetName='Continue', Mandatory)] [Parameter(ParameterSetName='ContinueExpanded', Mandatory)] + [Parameter(ParameterSetName='ContinueViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='ContinueViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # Troubleshooter resource Name. @@ -1365,24 +1435,21 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='Continue', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='ContinueViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody] # Troubleshooter ContinueRequest body. - # To construct, see NOTES section for CONTINUEREQUESTBODY properties and create a hash table. ${ContinueRequestBody}, [Parameter(ParameterSetName='ContinueExpanded')] [Parameter(ParameterSetName='ContinueViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse[]] # . - # To construct, see NOTES section for RESPONSE properties and create a hash table. ${Response}, [Parameter(ParameterSetName='ContinueExpanded')] @@ -1392,6 +1459,18 @@ param( # Unique id of the result. ${StepId}, + [Parameter(ParameterSetName='ContinueViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Continue operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='ContinueViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Continue operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1454,6 +1533,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -1477,6 +1565,8 @@ begin { ContinueExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueExpanded'; ContinueViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueViaIdentity'; ContinueViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded'; + ContinueViaJsonFilePath = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueViaJsonFilePath'; + ContinueViaJsonString = 'Az.SelfHelp.private\Invoke-AzSelfHelpContinueTroubleshooter_ContinueViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1485,6 +1575,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) @@ -1537,11 +1630,9 @@ Solution discovery using natural language processing. Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -SubscriptionId "6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba" -IssueSummary "Billing Issues" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse .Notes COMPLEX PARAMETER PROPERTIES @@ -1552,25 +1643,14 @@ DISCOVERSOLUTIONREQUEST : Discover NLP request. [IssueSummary ]: Describe the issue with the affected resource. [ResourceId ]: Provide resourceId of affected resource [ServiceId ]: Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response - -INPUTOBJECT : Identity Parameter - [DiagnosticsResourceName ]: Unique resource name for insight resources - [Id ]: Resource identity path - [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read - [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. - [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP - [SolutionResourceName ]: Solution resource Name. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpdiscoverysolutionnlpsubscriptionscope #> function Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse])] [CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Post')] - [Parameter(ParameterSetName='PostExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -1578,51 +1658,49 @@ param( # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest] # Discover NLP request. - # To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. ${DiscoverSolutionRequest}, [Parameter(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Additional information in the form of a string. ${AdditionalContext}, [Parameter(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Describe the issue with the affected resource. ${IssueSummary}, [Parameter(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Provide resourceId of affected resource ${ResourceId}, [Parameter(ParameterSetName='PostExpanded')] - [Parameter(ParameterSetName='PostViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Service Classification id for the resource. - # You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response + # You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response ${ServiceId}, + [Parameter(ParameterSetName='PostViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Post operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='PostViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Post operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1679,6 +1757,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -1700,12 +1787,10 @@ begin { $mapping = @{ Post = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post'; PostExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded'; - PostViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity'; - PostViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded'; + PostViaJsonFilePath = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonFilePath'; + PostViaJsonString = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonString'; } - if (('Post', 'PostExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Post', 'PostExpanded', 'PostViaJsonFilePath', 'PostViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1719,6 +1804,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) @@ -1771,9 +1859,9 @@ Solution discovery using natural language processing. Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -IssueSummary "Billing Issues" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse .Notes COMPLEX PARAMETER PROPERTIES @@ -1788,14 +1876,13 @@ DISCOVERSOLUTIONREQUEST : Discover NLP request. https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpdiscoverysolutionnlptenantscope #> function Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse])] [CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest] # Discover NLP request. - # To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. ${DiscoverSolutionRequest}, [Parameter(ParameterSetName='PostExpanded')] @@ -1820,9 +1907,21 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Service Classification id for the resource. - # You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response + # You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response ${ServiceId}, + [Parameter(ParameterSetName='PostViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Post operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='PostViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Post operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1879,6 +1978,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -1900,6 +2008,8 @@ begin { $mapping = @{ Post = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope_Post'; PostExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded'; + PostViaJsonFilePath = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonFilePath'; + PostViaJsonString = 'Az.SelfHelp.private\Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1908,6 +2018,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) @@ -1963,10 +2076,10 @@ $parameters = [ordered]@{ } Invoke-AzSelfHelpWarmSolutionUp -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SolutionResourceName $resourceName -Parameter $parameters -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody .Outputs System.Boolean .Notes @@ -1996,6 +2109,8 @@ function Invoke-AzSelfHelpWarmSolutionUp { param( [Parameter(ParameterSetName='Warm', Mandatory)] [Parameter(ParameterSetName='WarmExpanded', Mandatory)] + [Parameter(ParameterSetName='WarmViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='WarmViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read @@ -2003,6 +2118,8 @@ param( [Parameter(ParameterSetName='Warm', Mandatory)] [Parameter(ParameterSetName='WarmExpanded', Mandatory)] + [Parameter(ParameterSetName='WarmViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='WarmViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # Solution resource Name. @@ -2013,25 +2130,35 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter(ParameterSetName='Warm', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='WarmViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody] # Solution WarmUpRequest body - # To construct, see NOTES section for SOLUTIONWARMUPREQUESTBODY properties and create a hash table. ${SolutionWarmUpRequestBody}, [Parameter(ParameterSetName='WarmExpanded')] [Parameter(ParameterSetName='WarmViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters]))] [System.Collections.Hashtable] # Dictionary of ${Parameter}, + [Parameter(ParameterSetName='WarmViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Warm operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='WarmViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Warm operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2094,6 +2221,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -2117,6 +2253,8 @@ begin { WarmExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmExpanded'; WarmViaIdentity = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmViaIdentity'; WarmViaIdentityExpanded = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded'; + WarmViaJsonFilePath = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmViaJsonFilePath'; + WarmViaJsonString = 'Az.SelfHelp.private\Invoke-AzSelfHelpWarmSolutionUp_WarmViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2125,6 +2263,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) @@ -2170,10 +2311,10 @@ end { <# .Synopsis -Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. .Description -Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. .Example $insightsToInvoke = [ordered]@{ @@ -2181,13 +2322,25 @@ $insightsToInvoke = [ordered]@{ } New-AzSelfHelpDiagnostic -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aravind-test-resources/providers/Microsoft.KeyVault/vaults/ab-tests-kv-an" -SResourceName ab-test-973 -Insight $insightsToInvoke +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +INPUTOBJECT : Identity Parameter + [DiagnosticsResourceName ]: Unique resource name for insight resources + [Id ]: Resource identity path + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. + INSIGHT : SolutionIds that are needed to be invoked. [AdditionalParameter ]: Additional parameters required to invoke the solutionId. [(Any) ]: This indicates any property can be added to this object. @@ -2196,37 +2349,60 @@ INSIGHT : SolutionIds that are needed to be invoked. https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpdiagnostic #> function New-AzSelfHelpDiagnostic { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('DiagnosticsResourceName')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # Unique resource name for insight resources ${SResourceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters]))] [System.Collections.Hashtable] # Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results ${GlobalParameter}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation[]] # SolutionIds that are needed to be invoked. - # To construct, see NOTES section for INSIGHT properties and create a hash table. ${Insight}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2295,6 +2471,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -2315,6 +2500,9 @@ begin { $mapping = @{ CreateExpanded = 'Az.SelfHelp.private\New-AzSelfHelpDiagnostic_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.SelfHelp.private\New-AzSelfHelpDiagnostic_CreateViaIdentityExpanded'; + CreateViaJsonFilePath = 'Az.SelfHelp.private\New-AzSelfHelpDiagnostic_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.SelfHelp.private\New-AzSelfHelpDiagnostic_CreateViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2323,6 +2511,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) @@ -2368,13 +2559,13 @@ end { <# .Synopsis -Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +create a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response.

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

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API. @@ -2388,41 +2579,81 @@ $parameters = [ordered]@{ } New-AzSelfHelpSimplifiedSolution -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/aits-data-inestion/providers/Microsoft.KeyVault/vaults/kv-akshayko519290291381" -SResourceName $resourceName -SolutionId $solutionId -Parameter $parameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [DiagnosticsResourceName ]: Unique resource name for insight resources + [Id ]: Resource identity path + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpsimplifiedsolution #> function New-AzSelfHelpSimplifiedSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('SimplifiedSolutionsResourceName')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # Simplified Solutions Resource Name. ${SResourceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Simplified Solutions ${Parameter}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Solution Id to identify single Simplified Solution. ${SolutionId}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2491,6 +2722,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -2511,6 +2751,9 @@ begin { $mapping = @{ CreateExpanded = 'Az.SelfHelp.private\New-AzSelfHelpSimplifiedSolution_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.SelfHelp.private\New-AzSelfHelpSimplifiedSolution_CreateViaIdentityExpanded'; + CreateViaJsonFilePath = 'Az.SelfHelp.private\New-AzSelfHelpSimplifiedSolution_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.SelfHelp.private\New-AzSelfHelpSimplifiedSolution_CreateViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2519,6 +2762,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) @@ -2564,7 +2810,7 @@ end { <# .Synopsis -Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. @@ -2576,7 +2822,7 @@ In the absence of the ‘requiredParameters’ it is likely that some of the sol ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters .Description -Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. @@ -2599,51 +2845,86 @@ $parameters = [ordered]@{ New-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/6bded6d5-a6af-43e1-96d3-bf71f6f5f8ba/resourceGroups/DiagnosticsRp-Ev2AssistId-Public-Dev/providers/Microsoft.KeyVault/vaults/DiagRp-Ev2PublicDev -Parameter $parameters -TriggerCriterion $criteria +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. +INPUTOBJECT : Identity Parameter + [DiagnosticsResourceName ]: Unique resource name for insight resources + [Id ]: Resource identity path + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. + TRIGGERCRITERION : Solution request trigger criteria - [Name ]: Trigger criterion name. + [Name ]: Trigger criterion name. [Value ]: Trigger criterion value. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelpsolution #> function New-AzSelfHelpSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('SolutionResourceName')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # Solution resource Name. ${ResourceName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Solution ${Parameter}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion[]] # Solution request trigger criteria - # To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ${TriggerCriterion}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2712,6 +2993,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -2732,6 +3022,9 @@ begin { $mapping = @{ CreateExpanded = 'Az.SelfHelp.private\New-AzSelfHelpSolution_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.SelfHelp.private\New-AzSelfHelpSolution_CreateViaIdentityExpanded'; + CreateViaJsonFilePath = 'Az.SelfHelp.private\New-AzSelfHelpSolution_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.SelfHelp.private\New-AzSelfHelpSolution_CreateViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2740,6 +3033,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) @@ -2785,13 +3081,13 @@ end { <# .Synopsis -Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. +create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections. .Description -Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. +create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. @@ -2804,41 +3100,81 @@ $parameters = [ordered]@{ New-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a 6af-43e1-96d3-bf71f6f5f8ba" -Name "12d59989-f8a9-4b69-9919-1ef51df4eff6" -Parameter $parameters -SolutionId "e104dbdf-9e14-4c9f-bc78-21ac90382231" +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [DiagnosticsResourceName ]: Unique resource name for insight resources + [Id ]: Resource identity path + [Scope ]: scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + [SimplifiedSolutionsResourceName ]: Simplified Solutions Resource Name. + [SolutionId ]: SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + [SolutionResourceName ]: Solution resource Name. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [TroubleshooterName ]: Troubleshooter resource Name. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/new-azselfhelptroubleshooter #> function New-AzSelfHelpTroubleshooter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('TroubleshooterName')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # Troubleshooter resource Name. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ${Scope}, - [Parameter()] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Troubleshooter Resource ${Parameter}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] [System.String] # Solution Id to identify single troubleshooter. ${SolutionId}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2895,6 +3231,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -2915,6 +3260,9 @@ begin { $mapping = @{ CreateExpanded = 'Az.SelfHelp.private\New-AzSelfHelpTroubleshooter_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.SelfHelp.private\New-AzSelfHelpTroubleshooter_CreateViaIdentityExpanded'; + CreateViaJsonFilePath = 'Az.SelfHelp.private\New-AzSelfHelpTroubleshooter_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.SelfHelp.private\New-AzSelfHelpTroubleshooter_CreateViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2923,6 +3271,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) @@ -2979,7 +3330,7 @@ Restart-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3- .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse .Notes COMPLEX PARAMETER PROPERTIES @@ -2998,7 +3349,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.selfhelp/restart-azselfhelptroubleshooter #> function Restart-AzSelfHelpTroubleshooter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse])] [CmdletBinding(DefaultParameterSetName='Restart', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Restart', Mandatory)] @@ -3018,7 +3369,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -3077,6 +3427,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -3106,6 +3465,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) @@ -3199,7 +3561,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -3264,6 +3625,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -3293,6 +3663,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) @@ -3338,9 +3711,9 @@ end { <# .Synopsis -Update the requiredInputs or additional information needed to execute the solution +update the requiredInputs or additional information needed to execute the solution .Description -Update the requiredInputs or additional information needed to execute the solution +update the requiredInputs or additional information needed to execute the solution .Example $parameters = [ordered]@{ "SearchText" = "Can not Search" @@ -3354,7 +3727,7 @@ Update-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/ .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource .Notes COMPLEX PARAMETER PROPERTIES @@ -3371,16 +3744,18 @@ INPUTOBJECT : Identity Parameter [TroubleshooterName ]: Troubleshooter resource Name. TRIGGERCRITERION : Solution request trigger criteria - [Name ]: Trigger criterion name. + [Name ]: Trigger criterion name. [Value ]: Trigger criterion value. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/update-azselfhelpsolution #> function Update-AzSelfHelpSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('SolutionResourceName')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] @@ -3388,6 +3763,8 @@ param( ${ResourceName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read @@ -3397,24 +3774,36 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Solution ${Parameter}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion[]] # Solution request trigger criteria - # To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ${TriggerCriterion}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3483,6 +3872,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -3504,6 +3902,8 @@ begin { $mapping = @{ UpdateExpanded = 'Az.SelfHelp.private\Update-AzSelfHelpSolution_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.SelfHelp.private\Update-AzSelfHelpSolution_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.SelfHelp.private\Update-AzSelfHelpSolution_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.SelfHelp.private\Update-AzSelfHelpSolution_UpdateViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -3512,6 +3912,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/SelfHelp/SelfHelp.Autorest/exports/Restart-AzSelfHelpTroubleshooter.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Restart-AzSelfHelpTroubleshooter.ps1 index 5a37bd0ace08..c1229f1fa0c3 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Restart-AzSelfHelpTroubleshooter.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Restart-AzSelfHelpTroubleshooter.ps1 @@ -27,7 +27,7 @@ Restart-AzSelfHelpTroubleshooter -Scope "/subscriptions/6bded6d5-a6af-43e1-96d3- .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse .Notes COMPLEX PARAMETER PROPERTIES @@ -46,7 +46,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.selfhelp/restart-azselfhelptroubleshooter #> function Restart-AzSelfHelpTroubleshooter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse])] [CmdletBinding(DefaultParameterSetName='Restart', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Restart', Mandatory)] @@ -66,7 +66,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -125,6 +124,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -154,6 +162,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/SelfHelp/SelfHelp.Autorest/exports/Stop-AzSelfHelpTroubleshooter.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Stop-AzSelfHelpTroubleshooter.ps1 index 09ce3dcbc22f..265e0661bd51 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Stop-AzSelfHelpTroubleshooter.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Stop-AzSelfHelpTroubleshooter.ps1 @@ -64,7 +64,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -129,6 +128,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -158,6 +166,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/SelfHelp/SelfHelp.Autorest/exports/Update-AzSelfHelpSolution.ps1 b/generated/SelfHelp/SelfHelp.Autorest/exports/Update-AzSelfHelpSolution.ps1 index 073bc7ff1b24..71dfec23ddb5 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/exports/Update-AzSelfHelpSolution.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/exports/Update-AzSelfHelpSolution.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Update the requiredInputs or additional information needed to execute the solution +update the requiredInputs or additional information needed to execute the solution .Description -Update the requiredInputs or additional information needed to execute the solution +update the requiredInputs or additional information needed to execute the solution .Example $parameters = [ordered]@{ "SearchText" = "Can not Search" @@ -32,7 +32,7 @@ Update-AzSelfHelpSolution -ResourceName test-resource234 -Scope /subscriptions/ .Inputs Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource .Notes COMPLEX PARAMETER PROPERTIES @@ -49,16 +49,18 @@ INPUTOBJECT : Identity Parameter [TroubleshooterName ]: Troubleshooter resource Name. TRIGGERCRITERION : Solution request trigger criteria - [Name ]: Trigger criterion name. + [Name ]: Trigger criterion name. [Value ]: Trigger criterion value. .Link https://learn.microsoft.com/powershell/module/az.selfhelp/update-azselfhelpsolution #> function Update-AzSelfHelpSolution { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('SolutionResourceName')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] @@ -66,6 +68,8 @@ param( ${ResourceName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [System.String] # scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read @@ -75,24 +79,36 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters]))] [System.Collections.Hashtable] # Client input parameters to run Solution ${Parameter}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion[]] # Solution request trigger criteria - # To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ${TriggerCriterion}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -161,6 +177,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -182,6 +207,8 @@ begin { $mapping = @{ UpdateExpanded = 'Az.SelfHelp.private\Update-AzSelfHelpSolution_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.SelfHelp.private\Update-AzSelfHelpSolution_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.SelfHelp.private\Update-AzSelfHelpSolution_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.SelfHelp.private\Update-AzSelfHelpSolution_UpdateViaJsonString'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -190,6 +217,9 @@ begin { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/SelfHelp/SelfHelp.Autorest/generate-info.json b/generated/SelfHelp/SelfHelp.Autorest/generate-info.json index c3115e8be3e7..c8dbd3a63439 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generate-info.json +++ b/generated/SelfHelp/SelfHelp.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "673a2be0-2ac0-446e-a557-5cb7bd0bec5c" + "generate_Id": "14962a8a-9a35-47c6-8892-dc7a0a2fde6e" } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/Module.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/Module.cs index 6a3fafe9a185..0c423a48290c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/Module.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Module _instance; + /// the ISendAsync pipeline instance private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline _pipeline; /// the ISendAsync pipeline instance (when proxy is enabled) private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline _pipelineWithProxy; + 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,11 +64,8 @@ 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.SelfHelp.Module _instance; - /// the singleton of this module class - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module()); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp"; @@ -125,9 +130,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline CreatePi /// 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/SelfHelp/SelfHelp.Autorest/generated/api/Models/Any.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Any.PowerShell.cs index 49fcf1357396..da70c78f5586 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Any.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Any.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/api/Models/Any.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Any.cs index 03b44e330d57..f5fa913d8010 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Any.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Any.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - /// Any object + /// Anything public partial class Any : Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAnyInternal @@ -19,13 +19,13 @@ public Any() } } - /// Any object + /// Anything public partial interface IAny : Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable { } - /// Any object + /// Anything internal partial interface IAnyInternal { diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Any.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Any.json.cs index b54e0e604045..639ee8f2ad55 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Any.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Any.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - /// Any object + /// Anything public partial class Any { diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.PowerShell.cs deleted file mode 100644 index 047857a104e2..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.PowerShell.cs +++ /dev/null @@ -1,284 +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.SelfHelp.Models.Api20240301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; - - /// Diagnostic resource - [System.ComponentModel.TypeConverter(typeof(DiagnosticResourceTypeConverter))] - public partial class DiagnosticResource - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new DiagnosticResource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new DiagnosticResource(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal DiagnosticResource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("GlobalParameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); - } - if (content.Contains("Insight")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationTypeConverter.ConvertFrom)); - } - if (content.Contains("AcceptedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).AcceptedAt, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState.CreateFrom); - } - if (content.Contains("Diagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal DiagnosticResource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("GlobalParameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); - } - if (content.Contains("Insight")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationTypeConverter.ConvertFrom)); - } - if (content.Contains("AcceptedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).AcceptedAt, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState.CreateFrom); - } - if (content.Contains("Diagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Diagnostic resource - [System.ComponentModel.TypeConverter(typeof(DiagnosticResourceTypeConverter))] - public partial interface IDiagnosticResource - - { - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.cs deleted file mode 100644 index 53330d6c19d7..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.cs +++ /dev/null @@ -1,214 +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.SelfHelp.Models.Api20240301Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - - /// Diagnostic resource - public partial class DiagnosticResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(); - - /// Diagnostic Request Accepted time. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string AcceptedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt; } - - /// Array of Diagnostics. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).Diagnostic; } - - /// - /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics - /// results - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).GlobalParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).GlobalParameter = value ?? null /* model class */; } - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; } - - /// SolutionIds that are needed to be invoked. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).Insight; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).Insight = value ?? null /* arrayOf */; } - - /// Internal Acessors for AcceptedAt - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal.AcceptedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt = value; } - - /// Internal Acessors for Diagnostic - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal.Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).Diagnostic = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourceProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties _property; - - /// Diagnostic Resource properties. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourceProperties()); set => this._property = value; } - - /// Status of diagnostic provisioning. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState; } - - /// Gets the resource group name - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public DiagnosticResource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// Diagnostic resource - public partial interface IDiagnosticResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource - { - /// Diagnostic Request Accepted time. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Diagnostic Request Accepted time.", - SerializedName = @"acceptedAt", - PossibleTypes = new [] { typeof(string) })] - string AcceptedAt { get; } - /// Array of Diagnostics. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Array of Diagnostics.", - SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Diagnostic { get; } - /// - /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics - /// results - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results", - SerializedName = @"globalParameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } - /// SolutionIds that are needed to be invoked. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"SolutionIds that are needed to be invoked.", - SerializedName = @"insights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get; set; } - /// Status of diagnostic provisioning. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Status of diagnostic provisioning.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? ProvisioningState { get; } - - } - /// Diagnostic resource - internal partial interface IDiagnosticResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal - { - /// Diagnostic Request Accepted time. - string AcceptedAt { get; set; } - /// Array of Diagnostics. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Diagnostic { get; set; } - /// - /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics - /// results - /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } - /// SolutionIds that are needed to be invoked. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get; set; } - /// Diagnostic Resource properties. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties Property { get; set; } - /// Status of diagnostic provisioning. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? ProvisioningState { get; set; } - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.PowerShell.cs deleted file mode 100644 index d205c91fa535..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.PowerShell.cs +++ /dev/null @@ -1,294 +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.SelfHelp.Models.Api20240301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; - - /// Simplified Solutions response. - [System.ComponentModel.TypeConverter(typeof(SimplifiedSolutionsResourceTypeConverter))] - public partial class SimplifiedSolutionsResource - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SimplifiedSolutionsResource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SimplifiedSolutionsResource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SimplifiedSolutionsResource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("SolutionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).SolutionId, global::System.Convert.ToString); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParametersTypeConverter.ConvertFrom); - } - if (content.Contains("Title")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Title, global::System.Convert.ToString); - } - if (content.Contains("Appendix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Appendix = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix) content.GetValueForProperty("Appendix",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Appendix, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendixTypeConverter.ConvertFrom); - } - if (content.Contains("Content")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Content, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SimplifiedSolutionsResource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("SolutionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).SolutionId, global::System.Convert.ToString); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParametersTypeConverter.ConvertFrom); - } - if (content.Contains("Title")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Title, global::System.Convert.ToString); - } - if (content.Contains("Appendix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Appendix = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix) content.GetValueForProperty("Appendix",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Appendix, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendixTypeConverter.ConvertFrom); - } - if (content.Contains("Content")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).Content, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Simplified Solutions response. - [System.ComponentModel.TypeConverter(typeof(SimplifiedSolutionsResourceTypeConverter))] - public partial interface ISimplifiedSolutionsResource - - { - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.cs deleted file mode 100644 index 740bcb89d2e4..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.cs +++ /dev/null @@ -1,136 +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.SelfHelp.Models.Api20240301Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - - /// Metadata resource - public partial class SolutionMetadataResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(); - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Solutions()); set { {_property = value;} } } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions _property; - - /// Solution metadata Resource properties. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Solutions()); set => this._property = value; } - - /// List of metadata. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal)Property).Solution; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal)Property).Solution = value ?? null /* arrayOf */; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public SolutionMetadataResource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// Metadata resource - public partial interface ISolutionMetadataResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource - { - /// List of metadata. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"List of metadata.", - SerializedName = @"solutions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } - - } - /// Metadata resource - internal partial interface ISolutionMetadataResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal - { - /// Solution metadata Resource properties. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions Property { get; set; } - /// List of metadata. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.PowerShell.cs deleted file mode 100644 index 4b5cb7cdc918..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.PowerShell.cs +++ /dev/null @@ -1,294 +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.SelfHelp.Models.Api20240301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; - - /// Nlp Metadata resource - [System.ComponentModel.TypeConverter(typeof(SolutionNlpMetadataResourceTypeConverter))] - public partial class SolutionNlpMetadataResource - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SolutionNlpMetadataResource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SolutionNlpMetadataResource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SolutionNlpMetadataResource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutionsTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProblemTitle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemTitle = (string) content.GetValueForProperty("ProblemTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemTitle, global::System.Convert.ToString); - } - if (content.Contains("ProblemDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemDescription = (string) content.GetValueForProperty("ProblemDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemDescription, global::System.Convert.ToString); - } - if (content.Contains("ServiceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ServiceId, global::System.Convert.ToString); - } - if (content.Contains("ProblemClassificationId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemClassificationId = (string) content.GetValueForProperty("ProblemClassificationId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemClassificationId, global::System.Convert.ToString); - } - if (content.Contains("Solution")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("RelatedService")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).RelatedService = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[]) content.GetValueForProperty("RelatedService",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).RelatedService, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationServiceTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SolutionNlpMetadataResource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutionsTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProblemTitle")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemTitle = (string) content.GetValueForProperty("ProblemTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemTitle, global::System.Convert.ToString); - } - if (content.Contains("ProblemDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemDescription = (string) content.GetValueForProperty("ProblemDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemDescription, global::System.Convert.ToString); - } - if (content.Contains("ServiceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ServiceId, global::System.Convert.ToString); - } - if (content.Contains("ProblemClassificationId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemClassificationId = (string) content.GetValueForProperty("ProblemClassificationId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).ProblemClassificationId, global::System.Convert.ToString); - } - if (content.Contains("Solution")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); - } - if (content.Contains("RelatedService")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).RelatedService = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[]) content.GetValueForProperty("RelatedService",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal)this).RelatedService, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationServiceTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Nlp Metadata resource - [System.ComponentModel.TypeConverter(typeof(SolutionNlpMetadataResourceTypeConverter))] - public partial interface ISolutionNlpMetadataResource - - { - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.PowerShell.cs deleted file mode 100644 index 4aec9d66476a..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.PowerShell.cs +++ /dev/null @@ -1,278 +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.SelfHelp.Models.Api20240301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; - - /// Solution PatchRequest body - [System.ComponentModel.TypeConverter(typeof(SolutionPatchRequestBodyTypeConverter))] - public partial class SolutionPatchRequestBody - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SolutionPatchRequestBody(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SolutionPatchRequestBody(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SolutionPatchRequestBody(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ReplacementMap")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); - } - if (content.Contains("TriggerCriterion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterionTypeConverter.ConvertFrom)); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); - } - if (content.Contains("SolutionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).SolutionId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); - } - if (content.Contains("Title")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Title, global::System.Convert.ToString); - } - if (content.Contains("Content")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Content, global::System.Convert.ToString); - } - if (content.Contains("Section")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapWebResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapDiagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapTroubleshooter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideoGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapMetricsBasedChart")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SolutionPatchRequestBody(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ReplacementMap")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); - } - if (content.Contains("TriggerCriterion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterionTypeConverter.ConvertFrom)); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); - } - if (content.Contains("SolutionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).SolutionId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); - } - if (content.Contains("Title")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Title, global::System.Convert.ToString); - } - if (content.Contains("Content")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Content, global::System.Convert.ToString); - } - if (content.Contains("Section")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapWebResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapDiagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapTroubleshooter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideoGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapMetricsBasedChart")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Solution PatchRequest body - [System.ComponentModel.TypeConverter(typeof(SolutionPatchRequestBodyTypeConverter))] - public partial interface ISolutionPatchRequestBody - - { - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.cs deleted file mode 100644 index 3273fcbefff6..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.cs +++ /dev/null @@ -1,254 +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.SelfHelp.Models.Api20240301Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - - /// Solution PatchRequest body - public partial class SolutionPatchRequestBody : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal - { - - /// The HTML content that needs to be rendered and shown to customer. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Content; } - - /// Internal Acessors for Content - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Content = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for ReplacementMap - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.ReplacementMap { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMap; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMap = value; } - - /// Internal Acessors for Section - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Section; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Section = value; } - - /// Internal Acessors for SolutionId - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).SolutionId = value; } - - /// Internal Acessors for Title - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBodyInternal.Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Title = value; } - - /// Client input parameters to run Solution - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Parameter = value ?? null /* model class */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties _property; - - /// Solution result - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties()); set => this._property = value; } - - /// Status of solution provisioning. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState; } - - /// Solution diagnostics results. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic = value ?? null /* arrayOf */; } - - /// Solution metrics based charts - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart = value ?? null /* arrayOf */; } - - /// Solutions Troubleshooters - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter = value ?? null /* arrayOf */; } - - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo = value ?? null /* arrayOf */; } - - /// Group of Videos - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup = value ?? null /* arrayOf */; } - - /// Solution AzureKB results - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult = value ?? null /* arrayOf */; } - - /// List of section object. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Section; } - - /// Solution Id to identify single solution. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).SolutionId; } - - /// The title. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Title; } - - /// Solution request trigger criteria - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).TriggerCriterion; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).TriggerCriterion = value ?? null /* arrayOf */; } - - /// Creates an new instance. - public SolutionPatchRequestBody() - { - - } - } - /// Solution PatchRequest body - public partial interface ISolutionPatchRequestBody : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable - { - /// The HTML content that needs to be rendered and shown to customer. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The HTML content that needs to be rendered and shown to customer.", - SerializedName = @"content", - PossibleTypes = new [] { typeof(string) })] - string Content { get; } - /// Client input parameters to run Solution - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Client input parameters to run Solution", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } - /// Status of solution provisioning. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Status of solution provisioning.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; } - /// Solution diagnostics results. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution diagnostics results.", - SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } - /// Solution metrics based charts - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution metrics based charts", - SerializedName = @"metricsBasedCharts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } - /// Solutions Troubleshooters - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solutions Troubleshooters", - SerializedName = @"troubleshooters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", - SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } - /// Group of Videos - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Group of Videos", - SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } - /// Solution AzureKB results - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution AzureKB results", - SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } - /// List of section object. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"List of section object.", - SerializedName = @"sections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get; } - /// Solution Id to identify single solution. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Solution Id to identify single solution.", - SerializedName = @"solutionId", - PossibleTypes = new [] { typeof(string) })] - string SolutionId { get; } - /// The title. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The title.", - SerializedName = @"title", - PossibleTypes = new [] { typeof(string) })] - string Title { get; } - /// Solution request trigger criteria - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution request trigger criteria", - SerializedName = @"triggerCriteria", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get; set; } - - } - /// Solution PatchRequest body - internal partial interface ISolutionPatchRequestBodyInternal - - { - /// The HTML content that needs to be rendered and shown to customer. - string Content { get; set; } - /// Client input parameters to run Solution - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } - /// Solution result - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties Property { get; set; } - /// Status of solution provisioning. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; set; } - /// Solution replacement maps. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ReplacementMap { get; set; } - /// Solution diagnostics results. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } - /// Solution metrics based charts - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } - /// Solutions Troubleshooters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } - /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } - /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } - /// List of section object. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get; set; } - /// Solution Id to identify single solution. - string SolutionId { get; set; } - /// The title. - string Title { get; set; } - /// Solution request trigger criteria - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get; set; } - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.PowerShell.cs deleted file mode 100644 index 65b684d9f3e2..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.PowerShell.cs +++ /dev/null @@ -1,364 +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.SelfHelp.Models.Api20240301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; - - /// Solution response. - [System.ComponentModel.TypeConverter(typeof(SolutionResourceTypeConverter))] - public partial class SolutionResource - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SolutionResource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SolutionResource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SolutionResource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ReplacementMap")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); - } - if (content.Contains("TriggerCriterion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterionTypeConverter.ConvertFrom)); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); - } - if (content.Contains("SolutionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).SolutionId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); - } - if (content.Contains("Title")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Title, global::System.Convert.ToString); - } - if (content.Contains("Content")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Content, global::System.Convert.ToString); - } - if (content.Contains("Section")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapWebResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapDiagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapTroubleshooter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideoGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapMetricsBasedChart")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SolutionResource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ReplacementMap")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); - } - if (content.Contains("TriggerCriterion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterionTypeConverter.ConvertFrom)); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); - } - if (content.Contains("SolutionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).SolutionId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); - } - if (content.Contains("Title")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Title, global::System.Convert.ToString); - } - if (content.Contains("Content")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Content, global::System.Convert.ToString); - } - if (content.Contains("Section")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapWebResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapDiagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapTroubleshooter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideoGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapMetricsBasedChart")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Solution response. - [System.ComponentModel.TypeConverter(typeof(SolutionResourceTypeConverter))] - public partial interface ISolutionResource - - { - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.cs deleted file mode 100644 index 85f5025a19b1..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.cs +++ /dev/null @@ -1,360 +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.SelfHelp.Models.Api20240301Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - - /// Solution response. - public partial class SolutionResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IHeaderSerializable - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(); - - /// The HTML content that needs to be rendered and shown to customer. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Content; } - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; } - - /// Backing field for property. - private string _location; - - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string Location { get => this._location; set => this._location = value; } - - /// Internal Acessors for Content - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Content = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for ReplacementMap - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.ReplacementMap { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMap; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMap = value; } - - /// Internal Acessors for Section - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Section; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Section = value; } - - /// Internal Acessors for SolutionId - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).SolutionId = value; } - - /// Internal Acessors for Title - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal.Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Title = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; } - - /// Client input parameters to run Solution - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Parameter = value ?? null /* model class */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties _property; - - /// Solution result - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties()); set => this._property = value; } - - /// Status of solution provisioning. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ProvisioningState; } - - /// Solution diagnostics results. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic = value ?? null /* arrayOf */; } - - /// Solution metrics based charts - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart = value ?? null /* arrayOf */; } - - /// Solutions Troubleshooters - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter = value ?? null /* arrayOf */; } - - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo = value ?? null /* arrayOf */; } - - /// Group of Videos - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup = value ?? null /* arrayOf */; } - - /// Solution AzureKB results - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult = value ?? null /* arrayOf */; } - - /// Gets the resource group name - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } - - /// List of section object. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Section; } - - /// Solution Id to identify single solution. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).SolutionId; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } - - /// The title. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).Title; } - - /// Solution request trigger criteria - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).TriggerCriterion; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)Property).TriggerCriterion = value ?? null /* arrayOf */; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("Location", out var __locationHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; - } - } - - /// Creates an new instance. - public SolutionResource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// Solution response. - public partial interface ISolutionResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource - { - /// The HTML content that needs to be rendered and shown to customer. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The HTML content that needs to be rendered and shown to customer.", - SerializedName = @"content", - PossibleTypes = new [] { typeof(string) })] - string Content { get; } - - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Location", - PossibleTypes = new [] { typeof(string) })] - string Location { get; set; } - /// Client input parameters to run Solution - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Client input parameters to run Solution", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } - /// Status of solution provisioning. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Status of solution provisioning.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; } - /// Solution diagnostics results. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution diagnostics results.", - SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } - /// Solution metrics based charts - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution metrics based charts", - SerializedName = @"metricsBasedCharts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } - /// Solutions Troubleshooters - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solutions Troubleshooters", - SerializedName = @"troubleshooters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", - SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } - /// Group of Videos - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Group of Videos", - SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } - /// Solution AzureKB results - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution AzureKB results", - SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } - /// List of section object. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"List of section object.", - SerializedName = @"sections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get; } - /// Solution Id to identify single solution. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Solution Id to identify single solution.", - SerializedName = @"solutionId", - PossibleTypes = new [] { typeof(string) })] - string SolutionId { get; } - /// The title. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The title.", - SerializedName = @"title", - PossibleTypes = new [] { typeof(string) })] - string Title { get; } - /// Solution request trigger criteria - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution request trigger criteria", - SerializedName = @"triggerCriteria", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get; set; } - - } - /// Solution response. - internal partial interface ISolutionResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal - { - /// The HTML content that needs to be rendered and shown to customer. - string Content { get; set; } - - string Location { get; set; } - /// Client input parameters to run Solution - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } - /// Solution result - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties Property { get; set; } - /// Status of solution provisioning. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; set; } - /// Solution replacement maps. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ReplacementMap { get; set; } - /// Solution diagnostics results. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } - /// Solution metrics based charts - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } - /// Solutions Troubleshooters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } - /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } - /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } - /// List of section object. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get; set; } - /// Solution Id to identify single solution. - string SolutionId { get; set; } - /// The title. - string Title { get; set; } - /// Solution request trigger criteria - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get; set; } - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.PowerShell.cs deleted file mode 100644 index ce70485b67fc..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.PowerShell.cs +++ /dev/null @@ -1,270 +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.SelfHelp.Models.Api20240301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; - - /// Solution result - [System.ComponentModel.TypeConverter(typeof(SolutionResourcePropertiesTypeConverter))] - public partial class SolutionResourceProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SolutionResourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SolutionResourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SolutionResourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ReplacementMap")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); - } - if (content.Contains("TriggerCriterion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterionTypeConverter.ConvertFrom)); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); - } - if (content.Contains("SolutionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); - } - if (content.Contains("Title")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Title, global::System.Convert.ToString); - } - if (content.Contains("Content")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Content, global::System.Convert.ToString); - } - if (content.Contains("Section")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapWebResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapDiagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapTroubleshooter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideoGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapMetricsBasedChart")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SolutionResourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ReplacementMap")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); - } - if (content.Contains("TriggerCriterion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).TriggerCriterion = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[]) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterionTypeConverter.ConvertFrom)); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); - } - if (content.Contains("SolutionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); - } - if (content.Contains("Title")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Title, global::System.Convert.ToString); - } - if (content.Contains("Content")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Content, global::System.Convert.ToString); - } - if (content.Contains("Section")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapWebResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapDiagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapTroubleshooter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideoGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapMetricsBasedChart")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Solution result - [System.ComponentModel.TypeConverter(typeof(SolutionResourcePropertiesTypeConverter))] - public partial interface ISolutionResourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.cs deleted file mode 100644 index 0d5e99c62c2e..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.cs +++ /dev/null @@ -1,270 +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.SelfHelp.Models.Api20240301Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - - /// Solution result - public partial class SolutionResourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal - { - - /// Backing field for property. - private string _content; - - /// The HTML content that needs to be rendered and shown to customer. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string Content { get => this._content; } - - /// Internal Acessors for Content - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal.Content { get => this._content; set { {_content = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Internal Acessors for ReplacementMap - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMaps()); set { {_replacementMap = value;} } } - - /// Internal Acessors for Section - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal.Section { get => this._section; set { {_section = value;} } } - - /// Internal Acessors for SolutionId - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal.SolutionId { get => this._solutionId; set { {_solutionId = value;} } } - - /// Internal Acessors for Title - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesInternal.Title { get => this._title; set { {_title = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters _parameter; - - /// Client input parameters to run Solution - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParameters()); set => this._parameter = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? _provisioningState; - - /// Status of solution provisioning. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get => this._provisioningState; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps _replacementMap; - - /// Solution replacement maps. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMaps()); } - - /// Solution diagnostics results. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Diagnostic = value ?? null /* arrayOf */; } - - /// Solution metrics based charts - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart = value ?? null /* arrayOf */; } - - /// Solutions Troubleshooters - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Troubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Troubleshooter = value ?? null /* arrayOf */; } - - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } - - /// Group of Videos - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } - - /// Solution AzureKB results - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] _section; - - /// List of section object. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get => this._section; } - - /// Backing field for property. - private string _solutionId; - - /// Solution Id to identify single solution. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string SolutionId { get => this._solutionId; } - - /// Backing field for property. - private string _title; - - /// The title. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string Title { get => this._title; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] _triggerCriterion; - - /// Solution request trigger criteria - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get => this._triggerCriterion; set => this._triggerCriterion = value; } - - /// Creates an new instance. - public SolutionResourceProperties() - { - - } - } - /// Solution result - public partial interface ISolutionResourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable - { - /// The HTML content that needs to be rendered and shown to customer. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The HTML content that needs to be rendered and shown to customer.", - SerializedName = @"content", - PossibleTypes = new [] { typeof(string) })] - string Content { get; } - /// Client input parameters to run Solution - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Client input parameters to run Solution", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } - /// Status of solution provisioning. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Status of solution provisioning.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; } - /// Solution diagnostics results. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution diagnostics results.", - SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } - /// Solution metrics based charts - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution metrics based charts", - SerializedName = @"metricsBasedCharts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } - /// Solutions Troubleshooters - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solutions Troubleshooters", - SerializedName = @"troubleshooters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", - SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } - /// Group of Videos - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Group of Videos", - SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } - /// Solution AzureKB results - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution AzureKB results", - SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } - /// List of section object. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"List of section object.", - SerializedName = @"sections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get; } - /// Solution Id to identify single solution. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Solution Id to identify single solution.", - SerializedName = @"solutionId", - PossibleTypes = new [] { typeof(string) })] - string SolutionId { get; } - /// The title. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The title.", - SerializedName = @"title", - PossibleTypes = new [] { typeof(string) })] - string Title { get; } - /// Solution request trigger criteria - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution request trigger criteria", - SerializedName = @"triggerCriteria", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get; set; } - - } - /// Solution result - internal partial interface ISolutionResourcePropertiesInternal - - { - /// The HTML content that needs to be rendered and shown to customer. - string Content { get; set; } - /// Client input parameters to run Solution - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get; set; } - /// Status of solution provisioning. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; set; } - /// Solution replacement maps. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ReplacementMap { get; set; } - /// Solution diagnostics results. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } - /// Solution metrics based charts - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } - /// Solutions Troubleshooters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } - /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } - /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } - /// List of section object. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection[] Section { get; set; } - /// Solution Id to identify single solution. - string SolutionId { get; set; } - /// The title. - string Title { get; set; } - /// Solution request trigger criteria - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get; set; } - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.PowerShell.cs deleted file mode 100644 index 80df59830e19..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.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.SelfHelp.Models.Api20240301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; - - /// Self Help Solution response. - [System.ComponentModel.TypeConverter(typeof(SolutionResourceSelfHelpTypeConverter))] - public partial class SolutionResourceSelfHelp - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SolutionResourceSelfHelp(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SolutionResourceSelfHelp(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SolutionResourceSelfHelp(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelpTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ReplacementMap")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); - } - if (content.Contains("SolutionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).SolutionId, global::System.Convert.ToString); - } - if (content.Contains("Title")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Title, global::System.Convert.ToString); - } - if (content.Contains("Content")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Content, global::System.Convert.ToString); - } - if (content.Contains("Section")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelpTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapWebResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideoGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SolutionResourceSelfHelp(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelpTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemDataCreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ReplacementMap")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); - } - if (content.Contains("SolutionId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).SolutionId, global::System.Convert.ToString); - } - if (content.Contains("Title")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Title, global::System.Convert.ToString); - } - if (content.Contains("Content")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Content, global::System.Convert.ToString); - } - if (content.Contains("Section")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelpTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapWebResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); - } - if (content.Contains("ReplacementMapVideoGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Self Help Solution response. - [System.ComponentModel.TypeConverter(typeof(SolutionResourceSelfHelpTypeConverter))] - public partial interface ISolutionResourceSelfHelp - - { - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.cs deleted file mode 100644 index 03df9f29a8e2..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.cs +++ /dev/null @@ -1,253 +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.SelfHelp.Models.Api20240301Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - - /// Self Help Solution response. - public partial class SolutionResourceSelfHelp : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(); - - /// The HTML content that needs to be rendered and shown to customer. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Content; } - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; } - - /// Internal Acessors for Content - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal.Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Content = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelp()); set { {_property = value;} } } - - /// Internal Acessors for ReplacementMap - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal.ReplacementMap { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMap; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMap = value; } - - /// Internal Acessors for Section - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal.Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Section; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Section = value; } - - /// Internal Acessors for SolutionId - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal.SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).SolutionId = value; } - - /// Internal Acessors for Title - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelpInternal.Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Title = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp _property; - - /// Solution result - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelp()); set => this._property = value; } - - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideo = value ?? null /* arrayOf */; } - - /// Group of Videos - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideoGroup = value ?? null /* arrayOf */; } - - /// Solution AzureKB results - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapWebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapWebResult = value ?? null /* arrayOf */; } - - /// Gets the resource group name - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } - - /// List of section object. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Section; } - - /// - /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).SolutionId; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } - - /// The title. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)Property).Title; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public SolutionResourceSelfHelp() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// Self Help Solution response. - public partial interface ISolutionResourceSelfHelp : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource - { - /// The HTML content that needs to be rendered and shown to customer. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The HTML content that needs to be rendered and shown to customer.", - SerializedName = @"content", - PossibleTypes = new [] { typeof(string) })] - string Content { get; } - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", - SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } - /// Group of Videos - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Group of Videos", - SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } - /// Solution AzureKB results - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution AzureKB results", - SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } - /// List of section object. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"List of section object.", - SerializedName = @"sections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Section { get; } - /// - /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP", - SerializedName = @"solutionId", - PossibleTypes = new [] { typeof(string) })] - string SolutionId { get; } - /// The title. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The title.", - SerializedName = @"title", - PossibleTypes = new [] { typeof(string) })] - string Title { get; } - - } - /// Self Help Solution response. - internal partial interface ISolutionResourceSelfHelpInternal : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal - { - /// The HTML content that needs to be rendered and shown to customer. - string Content { get; set; } - /// Solution result - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp Property { get; set; } - /// Solution replacement maps. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp ReplacementMap { get; set; } - /// - /// Video solutions, which have the power to engage the customer by stimulating their senses - /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } - /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } - /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } - /// List of section object. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Section { get; set; } - /// - /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP - /// - string SolutionId { get; set; } - /// The title. - string Title { get; set; } - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.PowerShell.cs deleted file mode 100644 index 308064a80868..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.PowerShell.cs +++ /dev/null @@ -1,324 +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.SelfHelp.Models.Api20240301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; - - /// Troubleshooter step - [System.ComponentModel.TypeConverter(typeof(StepTypeConverter))] - public partial class Step - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Step(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Step(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Step(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AutomatedCheckResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult) content.GetValueForProperty("AutomatedCheckResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResult, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResultTypeConverter.ConvertFrom); - } - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Title")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Title, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Guidance")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Guidance = (string) content.GetValueForProperty("Guidance",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Guidance, global::System.Convert.ToString); - } - if (content.Contains("ExecutionStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatus = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus?) content.GetValueForProperty("ExecutionStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatus, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus.CreateFrom); - } - if (content.Contains("ExecutionStatusDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatusDescription = (string) content.GetValueForProperty("ExecutionStatusDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatusDescription, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type.CreateFrom); - } - if (content.Contains("IsLastStep")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).IsLastStep = (bool?) content.GetValueForProperty("IsLastStep",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).IsLastStep, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepInputTypeConverter.ConvertFrom)); - } - if (content.Contains("Insight")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.InsightTypeConverter.ConvertFrom)); - } - if (content.Contains("AutomatedCheckResultVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultVersion = (string) content.GetValueForProperty("AutomatedCheckResultVersion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultVersion, global::System.Convert.ToString); - } - if (content.Contains("AutomatedCheckResultStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultStatus = (string) content.GetValueForProperty("AutomatedCheckResultStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultStatus, global::System.Convert.ToString); - } - if (content.Contains("AutomatedCheckResultsResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultsResult = (string) content.GetValueForProperty("AutomatedCheckResultsResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultsResult, global::System.Convert.ToString); - } - if (content.Contains("AutomatedCheckResultType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType?) content.GetValueForProperty("AutomatedCheckResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType.CreateFrom); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("AdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Step(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AutomatedCheckResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult) content.GetValueForProperty("AutomatedCheckResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResult, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResultTypeConverter.ConvertFrom); - } - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Title")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Title, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Guidance")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Guidance = (string) content.GetValueForProperty("Guidance",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Guidance, global::System.Convert.ToString); - } - if (content.Contains("ExecutionStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatus = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus?) content.GetValueForProperty("ExecutionStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatus, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus.CreateFrom); - } - if (content.Contains("ExecutionStatusDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatusDescription = (string) content.GetValueForProperty("ExecutionStatusDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).ExecutionStatusDescription, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type.CreateFrom); - } - if (content.Contains("IsLastStep")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).IsLastStep = (bool?) content.GetValueForProperty("IsLastStep",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).IsLastStep, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepInputTypeConverter.ConvertFrom)); - } - if (content.Contains("Insight")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.InsightTypeConverter.ConvertFrom)); - } - if (content.Contains("AutomatedCheckResultVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultVersion = (string) content.GetValueForProperty("AutomatedCheckResultVersion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultVersion, global::System.Convert.ToString); - } - if (content.Contains("AutomatedCheckResultStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultStatus = (string) content.GetValueForProperty("AutomatedCheckResultStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultStatus, global::System.Convert.ToString); - } - if (content.Contains("AutomatedCheckResultsResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultsResult = (string) content.GetValueForProperty("AutomatedCheckResultsResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultsResult, global::System.Convert.ToString); - } - if (content.Contains("AutomatedCheckResultType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType?) content.GetValueForProperty("AutomatedCheckResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AutomatedCheckResultType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType.CreateFrom); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("AdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Troubleshooter step - [System.ComponentModel.TypeConverter(typeof(StepTypeConverter))] - public partial interface IStep - - { - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.cs deleted file mode 100644 index 10bef5e63245..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.cs +++ /dev/null @@ -1,188 +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.SelfHelp.Models.Api20240301Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - - /// Troubleshooter response. - public partial class TroubleshooterResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(); - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstanceProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for Step - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal.Step { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).Step; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).Step = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; } - - /// Client input parameters to run Troubleshooter Resource - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).Parameter = value ?? null /* model class */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties _property; - - /// Troubleshooter Instance properties. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstanceProperties()); set => this._property = value; } - - /// Status of troubleshooter provisioning. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).ProvisioningState; } - - /// Gets the resource group name - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } - - /// Solution Id to identify single troubleshooter. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).SolutionId = value ?? null; } - - /// List of step object. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Step { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)Property).Step; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public TroubleshooterResource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// Troubleshooter response. - public partial interface ITroubleshooterResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource - { - /// Client input parameters to run Troubleshooter Resource - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Client input parameters to run Troubleshooter Resource", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } - /// Status of troubleshooter provisioning. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Status of troubleshooter provisioning.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? ProvisioningState { get; } - /// Solution Id to identify single troubleshooter. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Solution Id to identify single troubleshooter.", - SerializedName = @"solutionId", - PossibleTypes = new [] { typeof(string) })] - string SolutionId { get; set; } - /// List of step object. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"List of step object.", - SerializedName = @"steps", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Step { get; } - - } - /// Troubleshooter response. - internal partial interface ITroubleshooterResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal - { - /// Client input parameters to run Troubleshooter Resource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } - /// Troubleshooter Instance properties. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties Property { get; set; } - /// Status of troubleshooter provisioning. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? ProvisioningState { get; set; } - /// Solution Id to identify single troubleshooter. - string SolutionId { get; set; } - /// List of step object. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Step { get; set; } - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ProxyResource.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ProxyResource.cs deleted file mode 100644 index f4982a9ae5d5..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ProxyResource.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.SelfHelp.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; - - /// - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - /// - public partial class ProxyResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IProxyResource, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IProxyResourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(); - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public ProxyResource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - public partial interface IProxyResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource - { - - } - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - internal partial interface IProxyResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal - { - - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/AutomatedCheckResult.PowerShell.cs similarity index 72% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/AutomatedCheckResult.PowerShell.cs index 6364f5dfc5f3..5b33447e3404 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/AutomatedCheckResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AutomatedCheckResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,25 +78,25 @@ internal AutomatedCheckResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Version")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Version, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Version, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Status, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Result")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Result, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Result, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)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. @@ -111,47 +111,45 @@ internal AutomatedCheckResult(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("Version")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Version, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Version, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Status, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Result")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Result, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Result, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)this).Type, 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.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AutomatedCheckResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AutomatedCheckResult(content); } @@ -161,7 +159,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/AutomatedCheckResult.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/AutomatedCheckResult.TypeConverter.cs index 89bf4ac21ebc..a2f03623f643 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/AutomatedCheckResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/AutomatedCheckResult.cs similarity index 80% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/AutomatedCheckResult.cs index 5e3120014513..3f7698dcbbcd 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/AutomatedCheckResult.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Only for AutomatedStep type public partial class AutomatedCheckResult : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal { /// Backing field for property. @@ -28,11 +28,11 @@ public partial class AutomatedCheckResult : public string Status { get => this._status; set => this._status = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? _type; + private string _type; /// Type of Result. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? Type { get => this._type; set => this._type = value; } + public string Type { get => this._type; set => this._type = value; } /// Backing field for property. private string _version; @@ -55,6 +55,9 @@ public partial interface IAutomatedCheckResult : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Insight Article Content", SerializedName = @"result", PossibleTypes = new [] { typeof(string) })] @@ -63,6 +66,9 @@ public partial interface IAutomatedCheckResult : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Status for automated check result", SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] @@ -71,14 +77,21 @@ public partial interface IAutomatedCheckResult : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of Result.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? Type { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Success", "Warning", "Error", "Information")] + string Type { get; set; } /// Version for automated check result [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Version for automated check result", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] @@ -94,7 +107,8 @@ internal partial interface IAutomatedCheckResultInternal /// Status for automated check result string Status { get; set; } /// Type of Result. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? Type { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Success", "Warning", "Error", "Information")] + string Type { get; set; } /// Version for automated check result string Version { get; set; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/AutomatedCheckResult.json.cs similarity index 92% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/AutomatedCheckResult.json.cs index f5acc7c5bcb1..5be4cfd149f8 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/AutomatedCheckResult.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/AutomatedCheckResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,21 +65,21 @@ internal AutomatedCheckResult(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtim { return; } - {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_result = If( json?.PropertyT("result"), out var __jsonResult) ? (string)__jsonResult : (string)Result;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)_version;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_result = If( json?.PropertyT("result"), out var __jsonResult) ? (string)__jsonResult : (string)_result;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new AutomatedCheckResult(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/CheckNameAvailabilityRequest.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityRequest.PowerShell.cs similarity index 81% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/CheckNameAvailabilityRequest.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityRequest.PowerShell.cs index 8f7d52dc94c0..eff266f71e6f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/CheckNameAvailabilityRequest.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityRequest.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CheckNameAvailabilityRequest 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 CheckNameAvailabilityRequest(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequestInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequestInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequestInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequestInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequestInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequestInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequestInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequestInternal)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. @@ -103,37 +103,37 @@ internal CheckNameAvailabilityRequest(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequestInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequestInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequestInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequestInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequestInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequestInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequestInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequestInternal)this).Type, 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.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CheckNameAvailabilityRequest(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CheckNameAvailabilityRequest(content); } @@ -143,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNam /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/CheckNameAvailabilityRequest.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityRequest.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/CheckNameAvailabilityRequest.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityRequest.TypeConverter.cs index a9419ad22cff..8976444abba1 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/CheckNameAvailabilityRequest.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityRequest.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/CheckNameAvailabilityRequest.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityRequest.cs similarity index 87% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/CheckNameAvailabilityRequest.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityRequest.cs index 080a1b4e5dfa..78efe9b7f823 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/CheckNameAvailabilityRequest.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityRequest.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// The check availability request body. public partial class CheckNameAvailabilityRequest : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequestInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequestInternal { /// Backing field for property. @@ -41,6 +41,9 @@ public partial interface ICheckNameAvailabilityRequest : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the resource for which availability needs to be checked.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -49,6 +52,9 @@ public partial interface ICheckNameAvailabilityRequest : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The resource type.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/CheckNameAvailabilityRequest.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityRequest.json.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/CheckNameAvailabilityRequest.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityRequest.json.cs index b435a023396d..c7b947b35cd1 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/CheckNameAvailabilityRequest.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityRequest.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,19 +65,19 @@ internal CheckNameAvailabilityRequest(Microsoft.Azure.PowerShell.Cmdlets.SelfHel { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new CheckNameAvailabilityRequest(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityResponse.PowerShell.cs similarity index 74% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityResponse.PowerShell.cs index 9fe7d78deccf..d5cfad37715f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CheckNameAvailabilityResponse partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,21 +78,21 @@ internal CheckNameAvailabilityResponse(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("NameAvailable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponseInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponseInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Reason")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Reason, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponseInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponseInternal)this).Reason, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponseInternal)this).Message, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -107,43 +107,41 @@ internal CheckNameAvailabilityResponse(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("NameAvailable")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponseInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponseInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Reason")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Reason, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponseInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponseInternal)this).Reason, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponseInternal)this).Message, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CheckNameAvailabilityResponse(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CheckNameAvailabilityResponse(content); } @@ -153,7 +151,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityResponse.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityResponse.TypeConverter.cs index 4cc35a6889fd..8bd8746fe169 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityResponse.cs similarity index 91% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityResponse.cs index 11365f1cc72e..a8d07069cdf8 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityResponse.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Response for whether the requested resource name is available or not. public partial class CheckNameAvailabilityResponse : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponseInternal { /// Backing field for property. @@ -54,6 +54,9 @@ public partial interface ICheckNameAvailabilityResponse : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Gets an error message explaining the 'reason' value with more details. This field is returned iif nameAvailable is false.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -62,6 +65,9 @@ public partial interface ICheckNameAvailabilityResponse : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Returns true or false depending on the availability of the name", SerializedName = @"nameAvailable", PossibleTypes = new [] { typeof(bool) })] @@ -72,6 +78,9 @@ public partial interface ICheckNameAvailabilityResponse : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Reason for why value is not available. This field is returned if nameAvailable is false.", SerializedName = @"reason", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityResponse.json.cs similarity index 93% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityResponse.json.cs index 3026e22447b5..64194ed05fe9 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/CheckNameAvailabilityResponse.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/CheckNameAvailabilityResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,20 +65,20 @@ internal CheckNameAvailabilityResponse(Microsoft.Azure.PowerShell.Cmdlets.SelfHe { return; } - {_nameAvailable = If( json?.PropertyT("nameAvailable"), out var __jsonNameAvailable) ? (bool?)__jsonNameAvailable : NameAvailable;} - {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_nameAvailable = If( json?.PropertyT("nameAvailable"), out var __jsonNameAvailable) ? (bool?)__jsonNameAvailable : _nameAvailable;} + {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)_reason;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new CheckNameAvailabilityResponse(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ClassificationService.PowerShell.cs similarity index 75% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ClassificationService.PowerShell.cs index a36a2f0bc635..5fe93e8ba930 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ClassificationService.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ClassificationService partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,21 +78,21 @@ internal ClassificationService(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ServiceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ServiceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal)this).ServiceId, global::System.Convert.ToString); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal)this).DisplayName, global::System.Convert.ToString); } if (content.Contains("ResourceType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ResourceType = (string[]) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ResourceType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal)this).ResourceType = (System.Collections.Generic.List) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal)this).ResourceType, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -107,43 +107,41 @@ internal ClassificationService(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("ServiceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ServiceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal)this).ServiceId, global::System.Convert.ToString); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal)this).DisplayName, global::System.Convert.ToString); } if (content.Contains("ResourceType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ResourceType = (string[]) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal)this).ResourceType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal)this).ResourceType = (System.Collections.Generic.List) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal)this).ResourceType, __y => TypeConverterExtensions.SelectToList(__y, 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.SelfHelp.Models.Api20240301Preview.IClassificationService DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationService DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ClassificationService(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationService DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ClassificationService(content); } @@ -153,7 +151,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationService FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ClassificationService.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ClassificationService.TypeConverter.cs index 91885adc7083..5f9983b78d75 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ClassificationService.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationService ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationService).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ClassificationService.cs similarity index 78% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ClassificationService.cs index ade015e977f6..7745e570427a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ClassificationService.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Service Classification result object. public partial class ClassificationService : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationService, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal { /// Backing field for property. @@ -21,17 +21,17 @@ public partial class ClassificationService : public string DisplayName { get => this._displayName; } /// Internal Acessors for DisplayName - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } /// Internal Acessors for ServiceId - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationServiceInternal.ServiceId { get => this._serviceId; set { {_serviceId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationServiceInternal.ServiceId { get => this._serviceId; set { {_serviceId = value;} } } /// Backing field for property. - private string[] _resourceType; + private System.Collections.Generic.List _resourceType; /// List of applicable ARM resource types for this service. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string[] ResourceType { get => this._resourceType; set => this._resourceType = value; } + public System.Collections.Generic.List ResourceType { get => this._resourceType; set => this._resourceType = value; } /// Backing field for property. private string _serviceId; @@ -54,6 +54,9 @@ public partial interface IClassificationService : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Localized name of the azure service.", SerializedName = @"displayName", PossibleTypes = new [] { typeof(string) })] @@ -62,14 +65,20 @@ public partial interface IClassificationService : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of applicable ARM resource types for this service.", SerializedName = @"resourceTypes", PossibleTypes = new [] { typeof(string) })] - string[] ResourceType { get; set; } + System.Collections.Generic.List ResourceType { get; set; } /// Azure resource Id of the service. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Azure resource Id of the service.", SerializedName = @"serviceId", PossibleTypes = new [] { typeof(string) })] @@ -83,7 +92,7 @@ internal partial interface IClassificationServiceInternal /// Localized name of the azure service. string DisplayName { get; set; } /// List of applicable ARM resource types for this service. - string[] ResourceType { get; set; } + System.Collections.Generic.List ResourceType { get; set; } /// Azure resource Id of the service. string ServiceId { get; set; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ClassificationService.json.cs similarity index 90% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ClassificationService.json.cs index 398766a42f34..e18a56c8f915 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ClassificationService.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ClassificationService.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,20 +65,20 @@ internal ClassificationService(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runti { return; } - {_serviceId = If( json?.PropertyT("serviceId"), out var __jsonServiceId) ? (string)__jsonServiceId : (string)ServiceId;} - {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} - {_resourceType = If( json?.PropertyT("resourceTypes"), out var __jsonResourceTypes) ? If( __jsonResourceTypes as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ResourceType;} + {_serviceId = If( json?.PropertyT("serviceId"), out var __jsonServiceId) ? (string)__jsonServiceId : (string)_serviceId;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + {_resourceType = If( json?.PropertyT("resourceTypes"), out var __jsonResourceTypes) ? If( __jsonResourceTypes as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _resourceType;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationService. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationService. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationService FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ClassificationService(json) : null; } @@ -102,11 +102,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._serviceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._serviceId.ToString()) : null, "serviceId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ContinueRequestBody.PowerShell.cs similarity index 75% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ContinueRequestBody.PowerShell.cs index a1fe318a3620..b1d9cdff49a2 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ContinueRequestBody.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class ContinueRequestBody partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal ContinueRequestBody(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("StepId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).StepId = (string) content.GetValueForProperty("StepId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).StepId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBodyInternal)this).StepId = (string) content.GetValueForProperty("StepId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBodyInternal)this).StepId, global::System.Convert.ToString); } if (content.Contains("Response")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).Response = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[]) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).Response, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResponseTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBodyInternal)this).Response = (System.Collections.Generic.List) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBodyInternal)this).Response, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResponseTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -103,39 +103,37 @@ internal ContinueRequestBody(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("StepId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).StepId = (string) content.GetValueForProperty("StepId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).StepId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBodyInternal)this).StepId = (string) content.GetValueForProperty("StepId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBodyInternal)this).StepId, global::System.Convert.ToString); } if (content.Contains("Response")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).Response = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[]) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal)this).Response, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResponseTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBodyInternal)this).Response = (System.Collections.Generic.List) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBodyInternal)this).Response, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResponseTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ContinueRequestBody(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ContinueRequestBody(content); } @@ -145,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ContinueRequestBody.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ContinueRequestBody.TypeConverter.cs index ade07150ac0d..4aacd6487bae 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ContinueRequestBody.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ContinueRequestBody.cs similarity index 68% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ContinueRequestBody.cs index c381612687bc..ef944fb73db4 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ContinueRequestBody.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Troubleshooter ContinueRequest body. public partial class ContinueRequestBody : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBodyInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBodyInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] _response; + private System.Collections.Generic.List _response; [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] Response { get => this._response; set => this._response = value; } + public System.Collections.Generic.List Response { get => this._response; set => this._response = value; } /// Backing field for property. private string _stepId; @@ -39,14 +39,20 @@ public partial interface IContinueRequestBody : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"responses", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] Response { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse) })] + System.Collections.Generic.List Response { get; set; } /// Unique id of the result. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Unique id of the result.", SerializedName = @"stepId", PossibleTypes = new [] { typeof(string) })] @@ -57,7 +63,7 @@ public partial interface IContinueRequestBody : internal partial interface IContinueRequestBodyInternal { - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] Response { get; set; } + System.Collections.Generic.List Response { get; set; } /// Unique id of the result. string StepId { get; set; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ContinueRequestBody.json.cs similarity index 89% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ContinueRequestBody.json.cs index 0c14b2abc534..028719d93e15 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ContinueRequestBody.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ContinueRequestBody.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ContinueRequestBody(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime { return; } - {_stepId = If( json?.PropertyT("stepId"), out var __jsonStepId) ? (string)__jsonStepId : (string)StepId;} - {_response = If( json?.PropertyT("responses"), out var __jsonResponses) ? If( __jsonResponses as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResponse.FromJson(__u) )) ))() : null : Response;} + {_stepId = If( json?.PropertyT("stepId"), out var __jsonStepId) ? (string)__jsonStepId : (string)_stepId;} + {_response = If( json?.PropertyT("responses"), out var __jsonResponses) ? If( __jsonResponses as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResponse.FromJson(__u) )) ))() : null : _response;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ContinueRequestBody(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Diagnostic.PowerShell.cs similarity index 60% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Diagnostic.PowerShell.cs index e953d7fa25b4..e5d95eb1d2b6 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Diagnostic.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class Diagnostic partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnostic DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Diagnostic(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnostic DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Diagnostic(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,41 +104,41 @@ internal Diagnostic(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorTypeConverter.ConvertFrom); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.InsightTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Insight = (System.Collections.Generic.List) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.InsightTypeConverter.ConvertFrom)); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -153,35 +153,35 @@ internal Diagnostic(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorTypeConverter.ConvertFrom); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.InsightTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Insight = (System.Collections.Generic.List) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.InsightTypeConverter.ConvertFrom)); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -191,7 +191,7 @@ internal Diagnostic(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnostic FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Diagnostic.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Diagnostic.TypeConverter.cs index d908c73e8516..21ee4820443c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Diagnostic.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnostic ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnostic).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Diagnostic.cs similarity index 66% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Diagnostic.cs index 290c61a09277..175d456e0d2a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Diagnostic.cs @@ -3,57 +3,57 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Properties returned with in an insight. public partial class Diagnostic : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnostic, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal { /// /// Service specific error code which serves as the substatus for the HTTP error code. /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)Error).Code; } /// /// An array of additional nested error response info objects, as described by this contract. /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Detail = value ?? null /* arrayOf */; } + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)Error).Detail = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError _error; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError _error; /// Error definition. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Error()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Error()); set => this._error = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] _insight; + private System.Collections.Generic.List _insight; /// The problems (if any) detected by this insight. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get => this._insight; set => this._insight = value; } + public System.Collections.Generic.List Insight { get => this._insight; set => this._insight = value; } /// Description of the error. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)Error).Message; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)Error).Code = value ?? null; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Error()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Error()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)Error).Message = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)Error).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)Error).Type = value ?? null; } /// Backing field for property. private string _solutionId; @@ -63,17 +63,17 @@ public partial class Diagnostic : public string SolutionId { get => this._solutionId; set => this._solutionId = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status? _status; + private string _status; /// Denotes the status of the diagnostic resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status? Status { get => this._status; set => this._status = value; } + public string Status { get => this._status; set => this._status = value; } /// /// Service specific error type which serves as additional context for the error herein. /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)Error).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)Error).Type; } /// Creates an new instance. public Diagnostic() @@ -91,6 +91,9 @@ public partial interface IDiagnostic : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Service specific error code which serves as the substatus for the HTTP error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -101,22 +104,31 @@ public partial interface IDiagnostic : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"An array of additional nested error response info objects, as described by this contract.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError) })] + System.Collections.Generic.List Detail { get; set; } /// The problems (if any) detected by this insight. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The problems (if any) detected by this insight.", SerializedName = @"insights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight) })] + System.Collections.Generic.List Insight { get; set; } /// Description of the error. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Description of the error.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -125,6 +137,9 @@ public partial interface IDiagnostic : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution Id", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] @@ -133,16 +148,23 @@ public partial interface IDiagnostic : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Denotes the status of the diagnostic resource.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status? Status { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Failed", "MissingInputs", "Running", "Succeeded", "Timeout")] + string Status { get; set; } /// /// Service specific error type which serves as additional context for the error herein. /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Service specific error type which serves as additional context for the error herein.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] @@ -160,17 +182,18 @@ internal partial interface IDiagnosticInternal /// /// An array of additional nested error response info objects, as described by this contract. /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// Error definition. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError Error { get; set; } /// The problems (if any) detected by this insight. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get; set; } + System.Collections.Generic.List Insight { get; set; } /// Description of the error. string Message { get; set; } /// Solution Id string SolutionId { get; set; } /// Denotes the status of the diagnostic resource. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Failed", "MissingInputs", "Running", "Succeeded", "Timeout")] + string Status { get; set; } /// /// Service specific error type which serves as additional context for the error herein. /// diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Diagnostic.json.cs similarity index 88% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Diagnostic.json.cs index d8b61859b259..af54d7c5cb03 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Diagnostic.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Diagnostic.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,21 +65,19 @@ internal Diagnostic(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Jso { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Error.FromJson(__jsonError) : Error;} - {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Insight.FromJson(__u) )) ))() : null : Insight;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Error.FromJson(__jsonError) : _error;} + {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)_solutionId;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Insight.FromJson(__u) )) ))() : null : _insight;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnostic. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnostic. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnostic FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Diagnostic(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocation.PowerShell.cs similarity index 76% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocation.PowerShell.cs index f2311e8c3121..2f72c55f6952 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,35 +63,33 @@ public partial class DiagnosticInvocation partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiagnosticInvocation(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiagnosticInvocation(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -106,17 +104,17 @@ internal DiagnosticInvocation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("AdditionalParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).AdditionalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters) content.GetValueForProperty("AdditionalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).AdditionalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationInternal)this).AdditionalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters) content.GetValueForProperty("AdditionalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationInternal)this).AdditionalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocationAdditionalParametersTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -131,11 +129,11 @@ internal DiagnosticInvocation(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("AdditionalParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).AdditionalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters) content.GetValueForProperty("AdditionalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal)this).AdditionalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationInternal)this).AdditionalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters) content.GetValueForProperty("AdditionalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationInternal)this).AdditionalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocationAdditionalParametersTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -145,7 +143,7 @@ internal DiagnosticInvocation(global::System.Management.Automation.PSObject cont /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocation.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocation.TypeConverter.cs index e3fad3bca9e4..91b8a75f42af 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocation.cs similarity index 72% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocation.cs index 63096519d916..4d9a68e4d166 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocation.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Solution Invocation with additional params needed for invocation. public partial class DiagnosticInvocation : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters _additionalParameter; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters _additionalParameter; /// Additional parameters required to invoke the solutionId. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get => (this._additionalParameter = this._additionalParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParameters()); set => this._additionalParameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get => (this._additionalParameter = this._additionalParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocationAdditionalParameters()); set => this._additionalParameter = value; } /// Backing field for property. private string _solutionId; @@ -41,14 +41,20 @@ public partial interface IDiagnosticInvocation : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Additional parameters required to invoke the solutionId.", SerializedName = @"additionalParameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get; set; } /// Solution Id to invoke. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution Id to invoke.", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] @@ -60,7 +66,7 @@ internal partial interface IDiagnosticInvocationInternal { /// Additional parameters required to invoke the solutionId. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters AdditionalParameter { get; set; } /// Solution Id to invoke. string SolutionId { get; set; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocation.json.cs similarity index 92% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocation.json.cs index cd78ba960d84..7a44c76e5848 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocation.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,19 +65,19 @@ internal DiagnosticInvocation(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtim { return; } - {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} - {_additionalParameter = If( json?.PropertyT("additionalParameters"), out var __jsonAdditionalParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParameters.FromJson(__jsonAdditionalParameters) : AdditionalParameter;} + {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)_solutionId;} + {_additionalParameter = If( json?.PropertyT("additionalParameters"), out var __jsonAdditionalParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocationAdditionalParameters.FromJson(__jsonAdditionalParameters) : _additionalParameter;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiagnosticInvocation(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.PowerShell.cs similarity index 87% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.PowerShell.cs index 20e4763aa4ff..c45b61981488 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,35 +63,35 @@ public partial class DiagnosticInvocationAdditionalParameters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiagnosticInvocationAdditionalParameters(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiagnosticInvocationAdditionalParameters(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -110,7 +110,7 @@ internal DiagnosticInvocationAdditionalParameters(global::System.Collections.IDi } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -136,7 +136,7 @@ internal DiagnosticInvocationAdditionalParameters(global::System.Management.Auto /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.TypeConverter.cs index ad0d010c2f45..44182f2f9c3e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.cs similarity index 79% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.cs index 6f04e661bdab..a9d031860afd 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Additional parameters required to invoke the solutionId. public partial class DiagnosticInvocationAdditionalParameters : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParametersInternal { /// diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.dictionary.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.dictionary.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.dictionary.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.dictionary.cs index 874e86e62817..90fe2caa52e4 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.dictionary.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationAdditionalParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocationAdditionalParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.json.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.json.cs index 2cc87762c7bf..9487f5ef94e4 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticInvocationAdditionalParameters.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticInvocationAdditionalParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -71,13 +71,13 @@ internal DiagnosticInvocationAdditionalParameters(Microsoft.Azure.PowerShell.Cmd } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocationAdditionalParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocationAdditionalParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiagnosticInvocationAdditionalParameters(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResource.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResource.PowerShell.cs new file mode 100644 index 000000000000..38585e72f90c --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResource.PowerShell.cs @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Diagnostic resource + [System.ComponentModel.TypeConverter(typeof(DiagnosticResourceTypeConverter))] + public partial class DiagnosticResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DiagnosticResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DiagnosticResource(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DiagnosticResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("GlobalParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Insight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).Insight = (System.Collections.Generic.List) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).Insight, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocationTypeConverter.ConvertFrom)); + } + if (content.Contains("AcceptedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).AcceptedAt, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Diagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).Diagnostic = (System.Collections.Generic.List) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DiagnosticResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("GlobalParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Insight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).Insight = (System.Collections.Generic.List) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).Insight, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocationTypeConverter.ConvertFrom)); + } + if (content.Contains("AcceptedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).AcceptedAt, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Diagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).Diagnostic = (System.Collections.Generic.List) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Diagnostic resource + [System.ComponentModel.TypeConverter(typeof(DiagnosticResourceTypeConverter))] + public partial interface IDiagnosticResource + + { + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResource.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResource.TypeConverter.cs index 350170bd72b9..b106d4321db2 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResource.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResource.cs new file mode 100644 index 000000000000..f2e605825e21 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResource.cs @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Diagnostic resource + public partial class DiagnosticResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(); + + /// Diagnostic Request Accepted time. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string AcceptedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt; } + + /// Array of Diagnostics. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)Property).Diagnostic; } + + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)Property).GlobalParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)Property).GlobalParameter = value ?? null /* model class */; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; } + + /// SolutionIds that are needed to be invoked. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Insight { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)Property).Insight; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)Property).Insight = value ?? null /* arrayOf */; } + + /// Internal Acessors for AcceptedAt + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal.AcceptedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)Property).AcceptedAt = value ?? null; } + + /// Internal Acessors for Diagnostic + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal.Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)Property).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)Property).Diagnostic = value ?? null /* arrayOf */; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties _property; + + /// Diagnostic Resource properties. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourceProperties()); set => this._property = value; } + + /// Status of diagnostic provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public DiagnosticResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// Diagnostic resource + public partial interface IDiagnosticResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource + { + /// Diagnostic Request Accepted time. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Diagnostic Request Accepted time.", + SerializedName = @"acceptedAt", + PossibleTypes = new [] { typeof(string) })] + string AcceptedAt { get; } + /// Array of Diagnostics. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Array of Diagnostics.", + SerializedName = @"diagnostics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnostic) })] + System.Collections.Generic.List Diagnostic { get; } + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results", + SerializedName = @"globalParameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } + /// SolutionIds that are needed to be invoked. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"SolutionIds that are needed to be invoked.", + SerializedName = @"insights", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation) })] + System.Collections.Generic.List Insight { get; set; } + /// Status of diagnostic provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Status of diagnostic provisioning.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; } + + } + /// Diagnostic resource + internal partial interface IDiagnosticResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResourceInternal + { + /// Diagnostic Request Accepted time. + string AcceptedAt { get; set; } + /// Array of Diagnostics. + System.Collections.Generic.List Diagnostic { get; set; } + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } + /// SolutionIds that are needed to be invoked. + System.Collections.Generic.List Insight { get; set; } + /// Diagnostic Resource properties. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties Property { get; set; } + /// Status of diagnostic provisioning. + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResource.json.cs similarity index 91% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResource.json.cs index 81edf0304686..bc5e941c0011 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResource.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,19 +65,19 @@ internal DiagnosticResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime. { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourceProperties.FromJson(__jsonProperties) : Property;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiagnosticResource(json) : null; } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourceProperties.PowerShell.cs similarity index 60% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourceProperties.PowerShell.cs index 4e2e18f23d1e..66fc7181de65 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourceProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,35 +63,33 @@ public partial class DiagnosticResourceProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiagnosticResourceProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiagnosticResourceProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -106,29 +104,29 @@ internal DiagnosticResourceProperties(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("GlobalParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).Insight = (System.Collections.Generic.List) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).Insight, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocationTypeConverter.ConvertFrom)); } if (content.Contains("AcceptedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).AcceptedAt, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).AcceptedAt, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("Diagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).Diagnostic = (System.Collections.Generic.List) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -143,23 +141,23 @@ internal DiagnosticResourceProperties(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("GlobalParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).GlobalParameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters) content.GetValueForProperty("GlobalParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).GlobalParameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourcePropertiesGlobalParametersTypeConverter.ConvertFrom); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).Insight = (System.Collections.Generic.List) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).Insight, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocationTypeConverter.ConvertFrom)); } if (content.Contains("AcceptedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).AcceptedAt, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).AcceptedAt = (string) content.GetValueForProperty("AcceptedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).AcceptedAt, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("Diagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).Diagnostic = (System.Collections.Generic.List) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -169,7 +167,7 @@ internal DiagnosticResourceProperties(global::System.Management.Automation.PSObj /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourceProperties.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourceProperties.TypeConverter.cs index a05d7a989e12..1ca20c77a4a8 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourceProperties.cs similarity index 59% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourceProperties.cs index 828dbb348b0b..da08fd284d1e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourceProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Diagnostic resource properties. public partial class DiagnosticResourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal { /// Backing field for property. @@ -21,44 +21,44 @@ public partial class DiagnosticResourceProperties : public string AcceptedAt { get => this._acceptedAt; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] _diagnostic; + private System.Collections.Generic.List _diagnostic; /// Array of Diagnostics. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Diagnostic { get => this._diagnostic; } + public System.Collections.Generic.List Diagnostic { get => this._diagnostic; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters _globalParameter; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters _globalParameter; /// /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics /// results /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => (this._globalParameter = this._globalParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParameters()); set => this._globalParameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => (this._globalParameter = this._globalParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourcePropertiesGlobalParameters()); set => this._globalParameter = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] _insight; + private System.Collections.Generic.List _insight; /// SolutionIds that are needed to be invoked. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get => this._insight; set => this._insight = value; } + public System.Collections.Generic.List Insight { get => this._insight; set => this._insight = value; } /// Internal Acessors for AcceptedAt - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal.AcceptedAt { get => this._acceptedAt; set { {_acceptedAt = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal.AcceptedAt { get => this._acceptedAt; set { {_acceptedAt = value;} } } /// Internal Acessors for Diagnostic - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal.Diagnostic { get => this._diagnostic; set { {_diagnostic = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal.Diagnostic { get => this._diagnostic; set { {_diagnostic = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? _provisioningState; + private string _provisioningState; /// Status of diagnostic provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? ProvisioningState { get => this._provisioningState; } + public string ProvisioningState { get => this._provisioningState; } /// Creates an new instance. public DiagnosticResourceProperties() @@ -74,6 +74,9 @@ public partial interface IDiagnosticResourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Diagnostic Request Accepted time.", SerializedName = @"acceptedAt", PossibleTypes = new [] { typeof(string) })] @@ -82,10 +85,13 @@ public partial interface IDiagnosticResourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Array of Diagnostics.", SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Diagnostic { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnostic) })] + System.Collections.Generic.List Diagnostic { get; } /// /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics /// results @@ -93,26 +99,36 @@ public partial interface IDiagnosticResourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results", SerializedName = @"globalParameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } /// SolutionIds that are needed to be invoked. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"SolutionIds that are needed to be invoked.", SerializedName = @"insights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation) })] + System.Collections.Generic.List Insight { get; set; } /// Status of diagnostic provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of diagnostic provisioning.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; } } /// Diagnostic resource properties. @@ -122,16 +138,17 @@ internal partial interface IDiagnosticResourcePropertiesInternal /// Diagnostic Request Accepted time. string AcceptedAt { get; set; } /// Array of Diagnostics. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic[] Diagnostic { get; set; } + System.Collections.Generic.List Diagnostic { get; set; } /// /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics /// results /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get; set; } /// SolutionIds that are needed to be invoked. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get; set; } + System.Collections.Generic.List Insight { get; set; } /// Status of diagnostic provisioning. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourceProperties.json.cs similarity index 84% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourceProperties.json.cs index ff2500971f78..34d7bc6a5bcb 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourceProperties.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,22 +65,22 @@ internal DiagnosticResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.SelfHel { return; } - {_globalParameter = If( json?.PropertyT("globalParameters"), out var __jsonGlobalParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParameters.FromJson(__jsonGlobalParameters) : GlobalParameter;} - {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticInvocation.FromJson(__u) )) ))() : null : Insight;} - {_acceptedAt = If( json?.PropertyT("acceptedAt"), out var __jsonAcceptedAt) ? (string)__jsonAcceptedAt : (string)AcceptedAt;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_diagnostic = If( json?.PropertyT("diagnostics"), out var __jsonDiagnostics) ? If( __jsonDiagnostics as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnostic) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Diagnostic.FromJson(__p) )) ))() : null : Diagnostic;} + {_globalParameter = If( json?.PropertyT("globalParameters"), out var __jsonGlobalParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourcePropertiesGlobalParameters.FromJson(__jsonGlobalParameters) : _globalParameter;} + {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticInvocation.FromJson(__u) )) ))() : null : _insight;} + {_acceptedAt = If( json?.PropertyT("acceptedAt"), out var __jsonAcceptedAt) ? (string)__jsonAcceptedAt : (string)_acceptedAt;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_diagnostic = If( json?.PropertyT("diagnostics"), out var __jsonDiagnostics) ? If( __jsonDiagnostics as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnostic) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Diagnostic.FromJson(__p) )) ))() : null : _diagnostic;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiagnosticResourceProperties(json) : null; } @@ -114,15 +114,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( } container.Add("insights",__w); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._acceptedAt)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._acceptedAt.ToString()) : null, "acceptedAt" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { if (null != this._diagnostic) { diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs similarity index 87% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs index 237dc2b09089..24f9fbba98a4 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -66,35 +66,35 @@ public partial class DiagnosticResourcePropertiesGlobalParameters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiagnosticResourcePropertiesGlobalParameters(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiagnosticResourcePropertiesGlobalParameters(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,7 +113,7 @@ internal DiagnosticResourcePropertiesGlobalParameters(global::System.Collections } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -139,7 +139,7 @@ internal DiagnosticResourcePropertiesGlobalParameters(global::System.Management. /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs index 2c51f3818db3..2171619c6ea9 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.cs similarity index 81% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.cs index 40c7e611fa73..356511d6ed4a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -12,8 +12,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview /// results /// public partial class DiagnosticResourcePropertiesGlobalParameters : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParametersInternal { /// diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs index 099cb38beb4e..56dcb6f35c92 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResourcePropertiesGlobalParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResourcePropertiesGlobalParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.json.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.json.cs index dcb3e9e8ac0a..47ed80134f22 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiagnosticResourcePropertiesGlobalParameters.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiagnosticResourcePropertiesGlobalParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -75,13 +75,13 @@ internal DiagnosticResourcePropertiesGlobalParameters(Microsoft.Azure.PowerShell } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiagnosticResourcePropertiesGlobalParameters(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpRequest.PowerShell.cs similarity index 72% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpRequest.PowerShell.cs index 493becfc6035..78316913232a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpRequest.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,35 +63,33 @@ public partial class DiscoveryNlpRequest partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiscoveryNlpRequest(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiscoveryNlpRequest(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -106,25 +104,25 @@ internal DiscoveryNlpRequest(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("IssueSummary")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).IssueSummary = (string) content.GetValueForProperty("IssueSummary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).IssueSummary, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).IssueSummary = (string) content.GetValueForProperty("IssueSummary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).IssueSummary, global::System.Convert.ToString); } if (content.Contains("ResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).ResourceId, global::System.Convert.ToString); } if (content.Contains("ServiceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ServiceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).ServiceId, global::System.Convert.ToString); } if (content.Contains("AdditionalContext")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).AdditionalContext = (string) content.GetValueForProperty("AdditionalContext",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).AdditionalContext, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).AdditionalContext = (string) content.GetValueForProperty("AdditionalContext",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).AdditionalContext, 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. @@ -139,19 +137,19 @@ internal DiscoveryNlpRequest(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("IssueSummary")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).IssueSummary = (string) content.GetValueForProperty("IssueSummary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).IssueSummary, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).IssueSummary = (string) content.GetValueForProperty("IssueSummary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).IssueSummary, global::System.Convert.ToString); } if (content.Contains("ResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).ResourceId, global::System.Convert.ToString); } if (content.Contains("ServiceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).ServiceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).ServiceId, global::System.Convert.ToString); } if (content.Contains("AdditionalContext")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).AdditionalContext = (string) content.GetValueForProperty("AdditionalContext",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal)this).AdditionalContext, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).AdditionalContext = (string) content.GetValueForProperty("AdditionalContext",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal)this).AdditionalContext, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -161,7 +159,7 @@ internal DiscoveryNlpRequest(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.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpRequest.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpRequest.TypeConverter.cs index ce162f38d371..e8c122f9f721 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpRequest.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpRequest.cs similarity index 91% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpRequest.cs index 207c51dec24c..e77a5aee78f1 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpRequest.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Discover NLP request. public partial class DiscoveryNlpRequest : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequestInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequestInternal { /// Backing field for property. @@ -58,6 +58,9 @@ public partial interface IDiscoveryNlpRequest : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Additional information in the form of a string.", SerializedName = @"additionalContext", PossibleTypes = new [] { typeof(string) })] @@ -66,6 +69,9 @@ public partial interface IDiscoveryNlpRequest : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Describe the issue with the affected resource.", SerializedName = @"issueSummary", PossibleTypes = new [] { typeof(string) })] @@ -74,6 +80,9 @@ public partial interface IDiscoveryNlpRequest : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Provide resourceId of affected resource", SerializedName = @"resourceId", PossibleTypes = new [] { typeof(string) })] @@ -85,6 +94,9 @@ public partial interface IDiscoveryNlpRequest : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response", SerializedName = @"serviceId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpRequest.json.cs similarity index 93% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpRequest.json.cs index b2d2900211c8..b7a73a464aee 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpRequest.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpRequest.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,21 +65,21 @@ internal DiscoveryNlpRequest(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime { return; } - {_issueSummary = If( json?.PropertyT("issueSummary"), out var __jsonIssueSummary) ? (string)__jsonIssueSummary : (string)IssueSummary;} - {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId;} - {_serviceId = If( json?.PropertyT("serviceId"), out var __jsonServiceId) ? (string)__jsonServiceId : (string)ServiceId;} - {_additionalContext = If( json?.PropertyT("additionalContext"), out var __jsonAdditionalContext) ? (string)__jsonAdditionalContext : (string)AdditionalContext;} + {_issueSummary = If( json?.PropertyT("issueSummary"), out var __jsonIssueSummary) ? (string)__jsonIssueSummary : (string)_issueSummary;} + {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)_resourceId;} + {_serviceId = If( json?.PropertyT("serviceId"), out var __jsonServiceId) ? (string)__jsonServiceId : (string)_serviceId;} + {_additionalContext = If( json?.PropertyT("additionalContext"), out var __jsonAdditionalContext) ? (string)__jsonAdditionalContext : (string)_additionalContext;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiscoveryNlpRequest(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpResponse.PowerShell.cs similarity index 78% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpResponse.PowerShell.cs index 236f747354f4..feca526ae365 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,35 +63,33 @@ public partial class DiscoveryNlpResponse partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiscoveryNlpResponse(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiscoveryNlpResponse(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -106,13 +104,13 @@ internal DiscoveryNlpResponse(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponseInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionNlpMetadataResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponseInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionNlpMetadataResourceTypeConverter.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. @@ -127,7 +125,7 @@ internal DiscoveryNlpResponse(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponseInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionNlpMetadataResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponseInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionNlpMetadataResourceTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -137,7 +135,7 @@ internal DiscoveryNlpResponse(global::System.Management.Automation.PSObject cont /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpResponse.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpResponse.TypeConverter.cs index 2010d83bc29c..a3ae436f0f24 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpResponse.cs similarity index 62% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpResponse.cs index f1f695d2b414..de15bb8e185c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpResponse.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Discovery Nlp response. public partial class DiscoveryNlpResponse : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponseInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource[] _value; + private System.Collections.Generic.List _value; /// The list of solution metadata. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource[] Value { get => this._value; set => this._value = value; } + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } /// Creates an new instance. public DiscoveryNlpResponse() @@ -34,10 +34,13 @@ public partial interface IDiscoveryNlpResponse : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The list of solution metadata.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResource) })] + System.Collections.Generic.List Value { get; set; } } /// Discovery Nlp response. @@ -45,7 +48,7 @@ internal partial interface IDiscoveryNlpResponseInternal { /// The list of solution metadata. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpResponse.json.cs similarity index 89% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpResponse.json.cs index 2877c42c5e61..2d3878bf2b92 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryNlpResponse.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryNlpResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,18 +65,18 @@ internal DiscoveryNlpResponse(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtim { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionNlpMetadataResource.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResource) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionNlpMetadataResource.FromJson(__u) )) ))() : null : _value;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiscoveryNlpResponse(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryResponse.PowerShell.cs similarity index 75% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryResponse.PowerShell.cs index f03b7470da41..0436724fa488 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class DiscoveryResponse partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DiscoveryResponse(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DiscoveryResponse(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,17 +104,17 @@ internal DiscoveryResponse(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponseInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponseInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponseInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -129,11 +129,11 @@ internal DiscoveryResponse(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponseInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponseInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataResourceTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponseInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponseInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -143,7 +143,7 @@ internal DiscoveryResponse(global::System.Management.Automation.PSObject content /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryResponse.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryResponse.TypeConverter.cs index f031e5fce8de..6f8ca1709a59 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryResponse.cs similarity index 71% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryResponse.cs index 5710cf617b39..3a7cc1a8dd59 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryResponse.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Discovery response. public partial class DiscoveryResponse : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponse, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponseInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class DiscoveryResponse : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource[] _value; + private System.Collections.Generic.List _value; /// The list of metadata. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource[] 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 DiscoveryResponse() @@ -41,6 +41,9 @@ public partial interface IDiscoveryResponse : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The link used to get the next page of solution metadata.", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] @@ -49,10 +52,13 @@ public partial interface IDiscoveryResponse : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The list of metadata.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource) })] + System.Collections.Generic.List Value { get; set; } } /// Discovery response. @@ -62,7 +68,7 @@ internal partial interface IDiscoveryResponseInternal /// The link used to get the next page of solution metadata. string NextLink { get; set; } /// The list of metadata. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryResponse.json.cs similarity index 89% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryResponse.json.cs index 0c919f7f8210..c6a6fb2b5b83 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/DiscoveryResponse.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/DiscoveryResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,19 +65,19 @@ internal DiscoveryResponse(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.J { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataResource.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataResource.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new DiscoveryResponse(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Error.PowerShell.cs similarity index 72% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Error.PowerShell.cs index d2a00537f318..7e77c66773fe 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Error.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class Error partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Error(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Error(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,25 +104,25 @@ internal Error(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -137,19 +137,19 @@ internal Error(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -159,7 +159,7 @@ internal Error(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Error.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Error.TypeConverter.cs index f800e79e8ea3..72306bcb980e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Error.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Error.cs similarity index 80% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Error.cs index 4bc4267486a5..23fbf8a68095 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Error.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Error definition. public partial class Error : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal { /// Backing field for property. @@ -23,13 +23,13 @@ public partial class Error : public string Code { get => this._code; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[] _detail; + private System.Collections.Generic.List _detail; /// /// An array of additional nested error response info objects, as described by this contract. /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[] Detail { get => this._detail; set => this._detail = value; } + public System.Collections.Generic.List Detail { get => this._detail; set => this._detail = value; } /// Backing field for property. private string _message; @@ -39,13 +39,13 @@ public partial class Error : public string Message { get => this._message; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal.Code { get => this._code; set { {_code = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal.Code { get => this._code; set { {_code = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal.Message { get => this._message; set { {_message = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IErrorInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _type; @@ -72,6 +72,9 @@ public partial interface IError : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Service specific error code which serves as the substatus for the HTTP error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -82,14 +85,20 @@ public partial interface IError : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"An array of additional nested error response info objects, as described by this contract.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError) })] + System.Collections.Generic.List Detail { get; set; } /// Description of the error. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Description of the error.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -100,6 +109,9 @@ public partial interface IError : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Service specific error type which serves as additional context for the error herein.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] @@ -117,7 +129,7 @@ internal partial interface IErrorInternal /// /// An array of additional nested error response info objects, as described by this contract. /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// Description of the error. string Message { get; set; } /// diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Error.json.cs similarity index 87% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Error.json.cs index 6622e9eea563..f1827c7fc42f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Error.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Error.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,21 +65,19 @@ internal Error(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObje { return; } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Error.FromJson(__u) )) ))() : null : Detail;} + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Error.FromJson(__u) )) ))() : null : _detail;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IError FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IError FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Error(json) : null; } @@ -103,15 +101,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs similarity index 80% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs index 674440b4a72e..a22b2d4447f8 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,33 +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.SelfHelp.Models.Api40.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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. @@ -104,17 +104,17 @@ internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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. @@ -129,11 +129,11 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.AnyTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -143,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.SelfHelp.Models.Api40.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs index af63991aa4b0..aea61e905934 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorAdditionalInfo.cs similarity index 82% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorAdditionalInfo.cs index f188ec1c2531..0784b39b190b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// The resource management error additional info. public partial class ErrorAdditionalInfo : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfoInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfoInternal { /// Backing field for property. @@ -21,10 +21,10 @@ public partial class ErrorAdditionalInfo : public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Any()); } /// Internal Acessors for Info - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Any()); set { {_info = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Any()); set { {_info = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.Models.IAny) })] @@ -55,6 +58,9 @@ public partial interface IErrorAdditionalInfo : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs similarity index 93% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs index 82c740ad4aee..13862bffa0eb 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorAdditionalInfo.json.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Any.FromJson(__jsonInfo) : Info;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Any.FromJson(__jsonInfo) : _info;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfo. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfo. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorDetail.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs similarity index 68% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorDetail.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs index ed519f43b0e0..e722483c3d1b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorDetail.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorDetail.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorDetail.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs index ad3ba221d697..31f57eca392a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorDetail.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorDetail.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorDetail.cs similarity index 66% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorDetail.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorDetail.cs index 35a92cc363b6..b2657bbc8253 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorDetail.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// The error detail. public partial class ErrorDetail : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] _additionalInfo; + private System.Collections.Generic.List _additionalInfo; /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.SelfHelp.Models.Api40.IErrorDetail[] _detail; + private System.Collections.Generic.List _detail; /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.SelfHelp.Models.Api40.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.Models.Api40.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.Models.Api40.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.Models.Api40.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.SelfHelp.Models.Api40.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/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorDetail.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorDetail.json.cs similarity index 84% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorDetail.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorDetail.json.cs index faf91146dc83..074973961adc 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorDetail.json.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,22 +65,20 @@ internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Js { return; } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetail.FromJson(__u) )) ))() : null : Detail;} - {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.SelfHelp.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.SelfHelp.Models.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetail.FromJson(__u) )) ))() : null : _detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : _additionalInfo;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; } @@ -104,19 +102,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { if (null != this._detail) { @@ -128,7 +126,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( container.Add("details",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { if (null != this._additionalInfo) { diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorResponse.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs similarity index 66% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorResponse.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs index 50f812039839..7771ebdde76f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorResponse.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetailTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetailTypeConverter.ConvertFrom)); } if (content.Contains("AdditionalInfo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorResponse.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorResponse.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs index ae226ab53cc6..1bb0bf108758 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorResponse.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorResponse.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorResponse.cs similarity index 57% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorResponse.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorResponse.cs index d5896ccf710c..35e012fe1230 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorResponse.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -12,54 +12,54 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40 /// the OData error response format.). /// public partial class ErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal { /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).AdditionalInfo; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Code; } /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Detail; } + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Detail; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail _error; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail _error; /// The error object. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetail()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetail()); set => this._error = value; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).AdditionalInfo = value ?? null /* arrayOf */; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Code = value ?? null; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Detail = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Detail = value ?? null /* arrayOf */; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetail()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetail()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Message = value ?? null; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Target = value ?? null; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Target; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Target; } /// Creates an new instance. public ErrorResponse() @@ -76,14 +76,20 @@ public partial interface IErrorResponse : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.Models.Api40.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.Models.Api40.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.SelfHelp.Models.Api40.IErrorDetail[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// The error object. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail Error { get; set; } /// The error message. string Message { get; set; } /// The error target. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorResponse.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorResponse.json.cs similarity index 95% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorResponse.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ErrorResponse.json.cs index 4d5ceefbc378..903b610df248 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ErrorResponse.json.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -68,18 +68,18 @@ internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json. { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetail.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetail.FromJson(__jsonError) : _error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Filter.PowerShell.cs similarity index 78% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Filter.PowerShell.cs index ed0540362e96..b79da314ef46 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Filter.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class Filter partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Filter(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Filter(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,21 +104,21 @@ internal Filter(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterInternal)this).Value, global::System.Convert.ToString); } if (content.Contains("Operator")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Operator, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterInternal)this).Operator, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -133,15 +133,15 @@ internal Filter(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterInternal)this).Value, global::System.Convert.ToString); } if (content.Contains("Operator")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal)this).Operator, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterInternal)this).Operator, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -151,7 +151,7 @@ internal Filter(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Filter.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Filter.TypeConverter.cs index 9019d0245220..6db5a6bcee1c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Filter.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilter ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilter).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Filter.cs similarity index 88% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Filter.cs index 1c03b1c86be5..f9c180264df1 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Filter.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Filter criterion public partial class Filter : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilter, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterInternal { /// Backing field for property. @@ -48,6 +48,9 @@ public partial interface IFilter : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Filter name", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -56,6 +59,9 @@ public partial interface IFilter : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Filter operator", SerializedName = @"operator", PossibleTypes = new [] { typeof(string) })] @@ -64,6 +70,9 @@ public partial interface IFilter : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Filter values", SerializedName = @"values", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Filter.json.cs similarity index 92% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Filter.json.cs index 6abe99742da3..306878c2348d 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Filter.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Filter.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,20 +65,18 @@ internal Filter(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObj { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_value = If( json?.PropertyT("values"), out var __jsonValues) ? (string)__jsonValues : (string)Value;} - {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_value = If( json?.PropertyT("values"), out var __jsonValues) ? (string)__jsonValues : (string)_value;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)_operator;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilter. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilter. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Filter(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/FilterGroup.PowerShell.cs similarity index 79% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/FilterGroup.PowerShell.cs index d26d3122e898..7367d35ee5ab 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/FilterGroup.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class FilterGroup partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FilterGroup(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FilterGroup(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,13 +104,13 @@ internal FilterGroup(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Filter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal)this).Filter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[]) content.GetValueForProperty("Filter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal)this).Filter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroupInternal)this).Filter = (System.Collections.Generic.List) content.GetValueForProperty("Filter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroupInternal)this).Filter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.FilterTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -125,7 +125,7 @@ internal FilterGroup(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Filter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal)this).Filter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[]) content.GetValueForProperty("Filter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal)this).Filter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroupInternal)this).Filter = (System.Collections.Generic.List) content.GetValueForProperty("Filter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroupInternal)this).Filter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.FilterTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -135,7 +135,7 @@ internal FilterGroup(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/FilterGroup.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/FilterGroup.TypeConverter.cs index 607323d70c07..38a4d682afa2 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/FilterGroup.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/FilterGroup.cs similarity index 63% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/FilterGroup.cs index a8e59a61ce1c..182774ef5aea 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/FilterGroup.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Filter group public partial class FilterGroup : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroupInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] _filter; + private System.Collections.Generic.List _filter; /// List of filters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] Filter { get => this._filter; set => this._filter = value; } + public System.Collections.Generic.List Filter { get => this._filter; set => this._filter = value; } /// Creates an new instance. public FilterGroup() @@ -34,10 +34,13 @@ public partial interface IFilterGroup : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of filters", SerializedName = @"filter", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] Filter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilter) })] + System.Collections.Generic.List Filter { get; set; } } /// Filter group @@ -45,7 +48,7 @@ internal partial interface IFilterGroupInternal { /// List of filters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] Filter { get; set; } + System.Collections.Generic.List Filter { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/FilterGroup.json.cs similarity index 88% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/FilterGroup.json.cs index ab3852985917..8efc01eb8966 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/FilterGroup.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/FilterGroup.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -65,18 +65,16 @@ internal FilterGroup(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Js { return; } - {_filter = If( json?.PropertyT("filter"), out var __jsonFilter) ? If( __jsonFilter as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Filter.FromJson(__u) )) ))() : null : Filter;} + {_filter = If( json?.PropertyT("filter"), out var __jsonFilter) ? If( __jsonFilter as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilter) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Filter.FromJson(__u) )) ))() : null : _filter;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new FilterGroup(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Insight.PowerShell.cs similarity index 74% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Insight.PowerShell.cs index 8656be58f08d..6c110ecd5497 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Insight.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Insight partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Insight(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Insight(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,25 +111,25 @@ internal Insight(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Result")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Result, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).Result, global::System.Convert.ToString); } if (content.Contains("ImportanceLevel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).ImportanceLevel = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel?) content.GetValueForProperty("ImportanceLevel",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).ImportanceLevel, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).ImportanceLevel = (string) content.GetValueForProperty("ImportanceLevel",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).ImportanceLevel, 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. @@ -144,19 +144,19 @@ internal Insight(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Result")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).Result, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).Result = (string) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).Result, global::System.Convert.ToString); } if (content.Contains("ImportanceLevel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).ImportanceLevel = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel?) content.GetValueForProperty("ImportanceLevel",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal)this).ImportanceLevel, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).ImportanceLevel = (string) content.GetValueForProperty("ImportanceLevel",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal)this).ImportanceLevel, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Insight.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Insight.TypeConverter.cs index 7949ee11f0c0..d866eb5cad1f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Insight.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Insight.cs similarity index 79% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Insight.cs index 73e1ae8b347d..939cc61b65bd 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Insight.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Detailed insights(s) obtained via the invocation of an insight diagnostic public partial class Insight : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsightInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsightInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class Insight : public string Id { get => this._id; set => this._id = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel? _importanceLevel; + private string _importanceLevel; /// Importance level of the insight. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel? ImportanceLevel { get => this._importanceLevel; set => this._importanceLevel = value; } + public string ImportanceLevel { get => this._importanceLevel; set => this._importanceLevel = value; } /// Backing field for property. private string _result; @@ -55,6 +55,9 @@ public partial interface IInsight : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Article id.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -63,14 +66,21 @@ public partial interface IInsight : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Importance level of the insight.", SerializedName = @"importanceLevel", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel? ImportanceLevel { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Critical", "Warning", "Information")] + string ImportanceLevel { get; set; } /// Detailed result content. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Detailed result content.", SerializedName = @"results", PossibleTypes = new [] { typeof(string) })] @@ -79,6 +89,9 @@ public partial interface IInsight : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This insight's title.", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] @@ -92,7 +105,8 @@ internal partial interface IInsightInternal /// Article id. string Id { get; set; } /// Importance level of the insight. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel? ImportanceLevel { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Critical", "Warning", "Information")] + string ImportanceLevel { get; set; } /// Detailed result content. string Result { get; set; } /// This insight's title. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Insight.json.cs similarity index 92% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Insight.json.cs index 37266f96526c..1f291b85c5f1 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Insight.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Insight.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Insight partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Insight(json) : null; } @@ -77,10 +75,10 @@ internal Insight(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonOb { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} - {_result = If( json?.PropertyT("results"), out var __jsonResults) ? (string)__jsonResults : (string)Result;} - {_importanceLevel = If( json?.PropertyT("importanceLevel"), out var __jsonImportanceLevel) ? (string)__jsonImportanceLevel : (string)ImportanceLevel;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)_title;} + {_result = If( json?.PropertyT("results"), out var __jsonResults) ? (string)__jsonResults : (string)_result;} + {_importanceLevel = If( json?.PropertyT("importanceLevel"), out var __jsonImportanceLevel) ? (string)__jsonImportanceLevel : (string)_importanceLevel;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/MetricsBasedChart.PowerShell.cs similarity index 61% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/MetricsBasedChart.PowerShell.cs index 94c69992a8af..f95bc213a7fa 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/MetricsBasedChart.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class MetricsBasedChart partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new MetricsBasedChart(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new MetricsBasedChart(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,37 +111,37 @@ internal MetricsBasedChart(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("FilterGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup) content.GetValueForProperty("FilterGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroup, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterGroupTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).FilterGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup) content.GetValueForProperty("FilterGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).FilterGroup, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.FilterGroupTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("AggregationType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).AggregationType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType?) content.GetValueForProperty("AggregationType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).AggregationType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).AggregationType = (string) content.GetValueForProperty("AggregationType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).AggregationType, global::System.Convert.ToString); } if (content.Contains("TimeSpanDuration")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).TimeSpanDuration = (string) content.GetValueForProperty("TimeSpanDuration",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).TimeSpanDuration, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).TimeSpanDuration = (string) content.GetValueForProperty("TimeSpanDuration",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).TimeSpanDuration, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("FilterGroupFilter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroupFilter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[]) content.GetValueForProperty("FilterGroupFilter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroupFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).FilterGroupFilter = (System.Collections.Generic.List) content.GetValueForProperty("FilterGroupFilter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).FilterGroupFilter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.FilterTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -156,31 +156,31 @@ internal MetricsBasedChart(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("FilterGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup) content.GetValueForProperty("FilterGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroup, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterGroupTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).FilterGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup) content.GetValueForProperty("FilterGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).FilterGroup, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.FilterGroupTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("AggregationType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).AggregationType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType?) content.GetValueForProperty("AggregationType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).AggregationType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).AggregationType = (string) content.GetValueForProperty("AggregationType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).AggregationType, global::System.Convert.ToString); } if (content.Contains("TimeSpanDuration")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).TimeSpanDuration = (string) content.GetValueForProperty("TimeSpanDuration",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).TimeSpanDuration, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).TimeSpanDuration = (string) content.GetValueForProperty("TimeSpanDuration",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).TimeSpanDuration, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("FilterGroupFilter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroupFilter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[]) content.GetValueForProperty("FilterGroupFilter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal)this).FilterGroupFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).FilterGroupFilter = (System.Collections.Generic.List) content.GetValueForProperty("FilterGroupFilter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal)this).FilterGroupFilter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.FilterTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/MetricsBasedChart.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/MetricsBasedChart.TypeConverter.cs index 06c8e9bf9a0a..a7b7a2f5eef0 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/MetricsBasedChart.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/MetricsBasedChart.cs similarity index 71% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/MetricsBasedChart.cs index d6c0084c6f6f..60a131104c59 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/MetricsBasedChart.cs @@ -3,36 +3,36 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Solutions metrics based chart public partial class MetricsBasedChart : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType? _aggregationType; + private string _aggregationType; /// Allowed values are Sum, Avg, Count, Min, Max. Default is Sum [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType? AggregationType { get => this._aggregationType; set => this._aggregationType = value; } + public string AggregationType { get => this._aggregationType; set => this._aggregationType = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup _filterGroup; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup _filterGroup; /// Filter group [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup FilterGroup { get => (this._filterGroup = this._filterGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterGroup()); set => this._filterGroup = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup FilterGroup { get => (this._filterGroup = this._filterGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.FilterGroup()); set => this._filterGroup = value; } /// List of filters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] FilterGroupFilter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal)FilterGroup).Filter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroupInternal)FilterGroup).Filter = value ?? null /* arrayOf */; } + public System.Collections.Generic.List FilterGroupFilter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroupInternal)FilterGroup).Filter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroupInternal)FilterGroup).Filter = value ?? null /* arrayOf */; } /// Internal Acessors for FilterGroup - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChartInternal.FilterGroup { get => (this._filterGroup = this._filterGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterGroup()); set { {_filterGroup = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChartInternal.FilterGroup { get => (this._filterGroup = this._filterGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.FilterGroup()); set { {_filterGroup = value;} } } /// Backing field for property. private string _name; @@ -76,22 +76,32 @@ public partial interface IMetricsBasedChart : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Allowed values are Sum, Avg, Count, Min, Max. Default is Sum", SerializedName = @"aggregationType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType? AggregationType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Sum", "Avg", "Count", "Min", "Max")] + string AggregationType { get; set; } /// List of filters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of filters", SerializedName = @"filter", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] FilterGroupFilter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilter) })] + System.Collections.Generic.List FilterGroupFilter { get; set; } /// Chart name [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Chart name", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -100,6 +110,9 @@ public partial interface IMetricsBasedChart : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Place holder used in HTML Content replace control with the content", SerializedName = @"replacementKey", PossibleTypes = new [] { typeof(string) })] @@ -108,6 +121,9 @@ public partial interface IMetricsBasedChart : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Time span duration", SerializedName = @"timeSpanDuration", PossibleTypes = new [] { typeof(string) })] @@ -116,6 +132,9 @@ public partial interface IMetricsBasedChart : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Chart title", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] @@ -127,11 +146,12 @@ internal partial interface IMetricsBasedChartInternal { /// Allowed values are Sum, Avg, Count, Min, Max. Default is Sum - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType? AggregationType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Sum", "Avg", "Count", "Min", "Max")] + string AggregationType { get; set; } /// Filter group - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilterGroup FilterGroup { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IFilterGroup FilterGroup { get; set; } /// List of filters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IFilter[] FilterGroupFilter { get; set; } + System.Collections.Generic.List FilterGroupFilter { get; set; } /// Chart name string Name { get; set; } /// Place holder used in HTML Content replace control with the content diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/MetricsBasedChart.json.cs similarity index 92% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/MetricsBasedChart.json.cs index e5446899cd5a..9588f9cba486 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/MetricsBasedChart.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/MetricsBasedChart.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class MetricsBasedChart partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new MetricsBasedChart(json) : null; } @@ -77,12 +77,12 @@ internal MetricsBasedChart(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.J { return; } - {_filterGroup = If( json?.PropertyT("filterGroup"), out var __jsonFilterGroup) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.FilterGroup.FromJson(__jsonFilterGroup) : FilterGroup;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_aggregationType = If( json?.PropertyT("aggregationType"), out var __jsonAggregationType) ? (string)__jsonAggregationType : (string)AggregationType;} - {_timeSpanDuration = If( json?.PropertyT("timeSpanDuration"), out var __jsonTimeSpanDuration) ? (string)__jsonTimeSpanDuration : (string)TimeSpanDuration;} - {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} - {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)ReplacementKey;} + {_filterGroup = If( json?.PropertyT("filterGroup"), out var __jsonFilterGroup) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.FilterGroup.FromJson(__jsonFilterGroup) : _filterGroup;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_aggregationType = If( json?.PropertyT("aggregationType"), out var __jsonAggregationType) ? (string)__jsonAggregationType : (string)_aggregationType;} + {_timeSpanDuration = If( json?.PropertyT("timeSpanDuration"), out var __jsonTimeSpanDuration) ? (string)__jsonTimeSpanDuration : (string)_timeSpanDuration;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)_title;} + {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)_replacementKey;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/NlpSolutions.PowerShell.cs similarity index 62% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/NlpSolutions.PowerShell.cs index 4ed16ec4c254..5031ea3db6a2 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/NlpSolutions.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class NlpSolutions partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NlpSolutions(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NlpSolutions(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,33 +111,33 @@ internal NlpSolutions(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ProblemTitle")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemTitle = (string) content.GetValueForProperty("ProblemTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemTitle, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ProblemTitle = (string) content.GetValueForProperty("ProblemTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ProblemTitle, global::System.Convert.ToString); } if (content.Contains("ProblemDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemDescription = (string) content.GetValueForProperty("ProblemDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ProblemDescription = (string) content.GetValueForProperty("ProblemDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ProblemDescription, global::System.Convert.ToString); } if (content.Contains("ServiceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ServiceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ServiceId, global::System.Convert.ToString); } if (content.Contains("ProblemClassificationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemClassificationId = (string) content.GetValueForProperty("ProblemClassificationId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemClassificationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ProblemClassificationId = (string) content.GetValueForProperty("ProblemClassificationId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ProblemClassificationId, global::System.Convert.ToString); } if (content.Contains("Solution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).Solution = (System.Collections.Generic.List) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); } if (content.Contains("RelatedService")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).RelatedService = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[]) content.GetValueForProperty("RelatedService",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).RelatedService, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationServiceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).RelatedService = (System.Collections.Generic.List) content.GetValueForProperty("RelatedService",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).RelatedService, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ClassificationServiceTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -152,27 +152,27 @@ internal NlpSolutions(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ProblemTitle")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemTitle = (string) content.GetValueForProperty("ProblemTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemTitle, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ProblemTitle = (string) content.GetValueForProperty("ProblemTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ProblemTitle, global::System.Convert.ToString); } if (content.Contains("ProblemDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemDescription = (string) content.GetValueForProperty("ProblemDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ProblemDescription = (string) content.GetValueForProperty("ProblemDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ProblemDescription, global::System.Convert.ToString); } if (content.Contains("ServiceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ServiceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ServiceId, global::System.Convert.ToString); } if (content.Contains("ProblemClassificationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemClassificationId = (string) content.GetValueForProperty("ProblemClassificationId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).ProblemClassificationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ProblemClassificationId = (string) content.GetValueForProperty("ProblemClassificationId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).ProblemClassificationId, global::System.Convert.ToString); } if (content.Contains("Solution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).Solution = (System.Collections.Generic.List) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); } if (content.Contains("RelatedService")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).RelatedService = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[]) content.GetValueForProperty("RelatedService",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)this).RelatedService, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationServiceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).RelatedService = (System.Collections.Generic.List) content.GetValueForProperty("RelatedService",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)this).RelatedService, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ClassificationServiceTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/NlpSolutions.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/NlpSolutions.TypeConverter.cs index 3266bb4e9c58..8342c768649a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/NlpSolutions.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/NlpSolutions.cs similarity index 75% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/NlpSolutions.cs index bc3299154341..d2609b79dad2 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/NlpSolutions.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Nlp metadata. public partial class NlpSolutions : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal { /// Backing field for property. @@ -35,11 +35,11 @@ public partial class NlpSolutions : public string ProblemTitle { get => this._problemTitle; set => this._problemTitle = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[] _relatedService; + private System.Collections.Generic.List _relatedService; /// The list of solution metadata. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[] RelatedService { get => this._relatedService; set => this._relatedService = value; } + public System.Collections.Generic.List RelatedService { get => this._relatedService; set => this._relatedService = value; } /// Backing field for property. private string _serviceId; @@ -49,11 +49,11 @@ public partial class NlpSolutions : public string ServiceId { get => this._serviceId; set => this._serviceId = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] _solution; + private System.Collections.Generic.List _solution; /// The list of solution metadata. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get => this._solution; set => this._solution = value; } + public System.Collections.Generic.List Solution { get => this._solution; set => this._solution = value; } /// Creates an new instance. public NlpSolutions() @@ -69,6 +69,9 @@ public partial interface INlpSolutions : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Problem Classification Id that is having the issue", SerializedName = @"problemClassificationId", PossibleTypes = new [] { typeof(string) })] @@ -77,6 +80,9 @@ public partial interface INlpSolutions : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Description for given ProblemClassificationId", SerializedName = @"problemDescription", PossibleTypes = new [] { typeof(string) })] @@ -85,6 +91,9 @@ public partial interface INlpSolutions : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Title for given ProblemClassificationId", SerializedName = @"problemTitle", PossibleTypes = new [] { typeof(string) })] @@ -93,14 +102,20 @@ public partial interface INlpSolutions : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The list of solution metadata.", SerializedName = @"relatedServices", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[] RelatedService { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationService) })] + System.Collections.Generic.List RelatedService { get; set; } /// Service resource id that is having the problem [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Service resource id that is having the problem", SerializedName = @"serviceId", PossibleTypes = new [] { typeof(string) })] @@ -109,10 +124,13 @@ public partial interface INlpSolutions : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The list of solution metadata.", SerializedName = @"solutions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties) })] + System.Collections.Generic.List Solution { get; set; } } /// Nlp metadata. @@ -126,11 +144,11 @@ internal partial interface INlpSolutionsInternal /// Title for given ProblemClassificationId string ProblemTitle { get; set; } /// The list of solution metadata. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[] RelatedService { get; set; } + System.Collections.Generic.List RelatedService { get; set; } /// Service resource id that is having the problem string ServiceId { get; set; } /// The list of solution metadata. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } + System.Collections.Generic.List Solution { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/NlpSolutions.json.cs similarity index 85% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/NlpSolutions.json.cs index 830c6a115b2e..5356224f7c61 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/NlpSolutions.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/NlpSolutions.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NlpSolutions partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new NlpSolutions(json) : null; } @@ -77,12 +77,12 @@ internal NlpSolutions(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.J { return; } - {_problemTitle = If( json?.PropertyT("problemTitle"), out var __jsonProblemTitle) ? (string)__jsonProblemTitle : (string)ProblemTitle;} - {_problemDescription = If( json?.PropertyT("problemDescription"), out var __jsonProblemDescription) ? (string)__jsonProblemDescription : (string)ProblemDescription;} - {_serviceId = If( json?.PropertyT("serviceId"), out var __jsonServiceId) ? (string)__jsonServiceId : (string)ServiceId;} - {_problemClassificationId = If( json?.PropertyT("problemClassificationId"), out var __jsonProblemClassificationId) ? (string)__jsonProblemClassificationId : (string)ProblemClassificationId;} - {_solution = If( json?.PropertyT("solutions"), out var __jsonSolutions) ? If( __jsonSolutions as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataProperties.FromJson(__u) )) ))() : null : Solution;} - {_relatedService = If( json?.PropertyT("relatedServices"), out var __jsonRelatedServices) ? If( __jsonRelatedServices as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ClassificationService.FromJson(__p) )) ))() : null : RelatedService;} + {_problemTitle = If( json?.PropertyT("problemTitle"), out var __jsonProblemTitle) ? (string)__jsonProblemTitle : (string)_problemTitle;} + {_problemDescription = If( json?.PropertyT("problemDescription"), out var __jsonProblemDescription) ? (string)__jsonProblemDescription : (string)_problemDescription;} + {_serviceId = If( json?.PropertyT("serviceId"), out var __jsonServiceId) ? (string)__jsonServiceId : (string)_serviceId;} + {_problemClassificationId = If( json?.PropertyT("problemClassificationId"), out var __jsonProblemClassificationId) ? (string)__jsonProblemClassificationId : (string)_problemClassificationId;} + {_solution = If( json?.PropertyT("solutions"), out var __jsonSolutions) ? If( __jsonSolutions as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataProperties.FromJson(__u) )) ))() : null : _solution;} + {_relatedService = If( json?.PropertyT("relatedServices"), out var __jsonRelatedServices) ? If( __jsonRelatedServices as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationService) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ClassificationService.FromJson(__p) )) ))() : null : _relatedService;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Operation.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Operation.PowerShell.cs similarity index 64% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Operation.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Operation.PowerShell.cs index c851b141796b..0d7497a41a8b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Operation.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Operation(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperatio /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,45 +113,45 @@ internal Operation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Display")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.OperationDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.OperationDisplayTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IsDataAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Origin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin?) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).Origin, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); } if (content.Contains("ActionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).ActionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType?) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).ActionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).ActionType, global::System.Convert.ToString); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.OperationDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.OperationDisplayTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("IsDataAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Origin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin?) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).Origin, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); } if (content.Contains("ActionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).ActionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType?) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).ActionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).ActionType, global::System.Convert.ToString); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Operation.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Operation.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Operation.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Operation.TypeConverter.cs index 993f253f05f7..c02bbdc64f33 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Operation.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Operation.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Operation.cs similarity index 74% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Operation.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Operation.cs index 79d9a8128f10..28fc3fc21673 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Operation.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -11,50 +11,50 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40 /// Details of a REST API operation, returned from the Resource Provider Operations API /// public partial class Operation : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperation, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType? ActionType { get => this._actionType; } + public string ActionType { get => this._actionType; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplay _display; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplay _display; /// Localized display information for this particular operation. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.OperationDisplay()); set => this._display = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)Display).Description; } + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)Display).Operation; } + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)Display).Provider; } + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)Display).Resource; } + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Support.ActionType? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } /// Internal Acessors for Display - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.OperationDisplay()); set { {_display = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.OperationDisplay()); set { {_display = value;} } } /// Internal Acessors for DisplayDescription - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)Display).Description = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)Display).Description = value ?? null; } /// Internal Acessors for DisplayOperation - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)Display).Operation = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)Display).Operation = value ?? null; } /// Internal Acessors for DisplayProvider - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)Display).Provider = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)Display).Provider = value ?? null; } /// Internal Acessors for DisplayResource - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)Display).Resource = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)Display).Resource = value ?? null; } /// Internal Acessors for IsDataAction - bool? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } + bool? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Origin - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationInternal.Origin { get => this._origin; set { {_origin = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.Support.ActionType) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType? ActionType { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Internal")] + string ActionType { get; } /// /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Support.Origin) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin? Origin { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Support.ActionType? ActionType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Internal")] + string ActionType { get; set; } /// Localized display information for this particular operation. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplay Display { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Support.Origin? Origin { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("user", "system", "user,system")] + string Origin { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Operation.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Operation.json.cs similarity index 90% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Operation.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Operation.json.cs index 914ab8dc034d..01f104f5e088 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Operation.json.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -56,13 +56,11 @@ public partial class Operation partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperation. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperation. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Operation(json) : null; } @@ -79,11 +77,11 @@ internal Operation(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Json { return; } - {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.SelfHelp.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 +105,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( return container; } AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._actionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._actionType.ToString()) : null, "actionType" ,container.Add ); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationDisplay.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs similarity index 76% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationDisplay.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs index ac94907f52fc..b78338f894c6 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationDisplay.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +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.SelfHelp.Models.Api40.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationDisplay(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperatio /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,25 +111,25 @@ internal OperationDisplay(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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. @@ -144,19 +144,19 @@ internal OperationDisplay(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationDisplay.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationDisplay.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs index df3ad33372ce..4ed02a7e519b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationDisplay.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplay ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplay ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplay).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplay).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationDisplay.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationDisplay.cs similarity index 88% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationDisplay.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationDisplay.cs index 549813e94285..ab44e2cc12c5 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationDisplay.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Localized display information for this particular operation. public partial class OperationDisplay : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplay, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } /// Internal Acessors for Operation - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } /// Internal Acessors for Provider - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } /// Internal Acessors for Resource - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationDisplay.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationDisplay.json.cs similarity index 91% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationDisplay.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationDisplay.json.cs index b12f11a9e6bc..db6d3463370b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationDisplay.json.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OperationDisplay partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplay. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplay. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplay. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplay. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; } @@ -77,10 +77,10 @@ internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Js { 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.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationListResult.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationListResult.PowerShell.cs similarity index 79% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationListResult.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationListResult.PowerShell.cs index 33a312988012..f72adeb35ef3 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationListResult.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -66,27 +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.SelfHelp.Models.Api40.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationListResult(content); } @@ -96,10 +96,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperatio /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -114,17 +114,17 @@ internal OperationListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.OperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.OperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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. @@ -139,11 +139,11 @@ internal OperationListResult(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.OperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.OperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationListResult.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationListResult.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs index aedbfcea930b..7ddd78c31336 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationListResult.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationListResult.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationListResult.cs similarity index 72% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationListResult.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationListResult.cs index 3ced3f514e88..bbcb3e51fff0 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationListResult.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -12,15 +12,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40 /// results. /// public partial class OperationListResult : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResult, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResult, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IOperation[] _value; + private System.Collections.Generic.List _value; /// List of operations supported by the resource provider [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.SelfHelp.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.SelfHelp.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.SelfHelp.Models.Api40.IOperation) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IOperation[] Value { get; set; } + System.Collections.Generic.List Value { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationListResult.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationListResult.json.cs similarity index 89% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationListResult.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/OperationListResult.json.cs index 95f44fe9ede9..fe61299cd5c5 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/OperationListResult.json.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -57,13 +57,13 @@ public partial class OperationListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; } @@ -80,8 +80,8 @@ internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.SelfHelp.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.SelfHelp.Models.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -116,7 +116,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ProxyResource.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ProxyResource.PowerShell.cs similarity index 60% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ProxyResource.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ProxyResource.PowerShell.cs index 80d243aaee7b..c1582ea68dc2 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ProxyResource.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ProxyResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -65,27 +65,27 @@ public partial class ProxyResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProxyResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProxyResource(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IProxyRes /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,49 +113,49 @@ internal ProxyResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)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. @@ -170,43 +170,43 @@ internal ProxyResource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ProxyResource.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ProxyResource.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs index 24b52aefb4a7..b002036b66af 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ProxyResource.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IProxyResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IProxyResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ProxyResource.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ProxyResource.cs new file mode 100644 index 000000000000..01873c3ad3b2 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ProxyResource.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProxyResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + public partial interface IProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResource + { + + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + internal partial interface IProxyResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal + { + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ProxyResource.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ProxyResource.json.cs similarity index 95% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ProxyResource.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ProxyResource.json.cs index f03fe7b33423..acff0d1fb589 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/ProxyResource.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ProxyResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ProxyResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IProxyResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IProxyResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; } @@ -79,7 +79,7 @@ internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json. { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(json); + __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Resource(json); AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMaps.PowerShell.cs similarity index 54% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMaps.PowerShell.cs index 5aa650a35c1d..8385ed557515 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMaps.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class ReplacementMaps partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ReplacementMaps(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ReplacementMaps(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,33 +111,33 @@ internal ReplacementMaps(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("WebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).WebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).WebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).WebResult = (System.Collections.Generic.List) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).WebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("Diagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).Diagnostic = (System.Collections.Generic.List) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("Troubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Troubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("Troubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Troubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).Troubleshooter = (System.Collections.Generic.List) content.GetValueForProperty("Troubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).Troubleshooter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("MetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).MetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("MetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).MetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).MetricsBasedChart = (System.Collections.Generic.List) content.GetValueForProperty("MetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).MetricsBasedChart, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.MetricsBasedChartTypeConverter.ConvertFrom)); } if (content.Contains("Video")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).Video = (System.Collections.Generic.List) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).Video, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); } if (content.Contains("VideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).VideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).VideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -152,27 +152,27 @@ internal ReplacementMaps(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("WebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).WebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).WebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).WebResult = (System.Collections.Generic.List) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).WebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("Diagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).Diagnostic = (System.Collections.Generic.List) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).Diagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("Troubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Troubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("Troubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Troubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).Troubleshooter = (System.Collections.Generic.List) content.GetValueForProperty("Troubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).Troubleshooter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("MetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).MetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("MetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).MetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).MetricsBasedChart = (System.Collections.Generic.List) content.GetValueForProperty("MetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).MetricsBasedChart, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.MetricsBasedChartTypeConverter.ConvertFrom)); } if (content.Contains("Video")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).Video = (System.Collections.Generic.List) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).Video, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); } if (content.Contains("VideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).VideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).VideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMaps.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMaps.TypeConverter.cs index ba9bc88d1436..e8501564e7ab 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMaps.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMaps.cs similarity index 53% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMaps.cs index 6dfa2277735b..ba175183a03d 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMaps.cs @@ -3,59 +3,59 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Solution replacement maps. public partial class ReplacementMaps : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] _diagnostic; + private System.Collections.Generic.List _diagnostic; /// Solution diagnostics results. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] Diagnostic { get => this._diagnostic; set => this._diagnostic = value; } + public System.Collections.Generic.List Diagnostic { get => this._diagnostic; set => this._diagnostic = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] _metricsBasedChart; + private System.Collections.Generic.List _metricsBasedChart; /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] MetricsBasedChart { get => this._metricsBasedChart; set => this._metricsBasedChart = value; } + public System.Collections.Generic.List MetricsBasedChart { get => this._metricsBasedChart; set => this._metricsBasedChart = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] _troubleshooter; + private System.Collections.Generic.List _troubleshooter; /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] Troubleshooter { get => this._troubleshooter; set => this._troubleshooter = value; } + public System.Collections.Generic.List Troubleshooter { get => this._troubleshooter; set => this._troubleshooter = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] _video; + private System.Collections.Generic.List _video; /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] Video { get => this._video; set => this._video = value; } + public System.Collections.Generic.List Video { get => this._video; set => this._video = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] _videoGroup; + private System.Collections.Generic.List _videoGroup; /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] VideoGroup { get => this._videoGroup; set => this._videoGroup = value; } + public System.Collections.Generic.List VideoGroup { get => this._videoGroup; set => this._videoGroup = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] _webResult; + private System.Collections.Generic.List _webResult; /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] WebResult { get => this._webResult; set => this._webResult = value; } + public System.Collections.Generic.List WebResult { get => this._webResult; set => this._webResult = value; } /// Creates an new instance. public ReplacementMaps() @@ -71,52 +71,70 @@ public partial interface IReplacementMaps : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution diagnostics results.", SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] Diagnostic { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic) })] + System.Collections.Generic.List Diagnostic { get; set; } /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution metrics based charts", SerializedName = @"metricsBasedCharts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] MetricsBasedChart { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart) })] + System.Collections.Generic.List MetricsBasedChart { get; set; } /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solutions Troubleshooters", SerializedName = @"troubleshooters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] Troubleshooter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters) })] + System.Collections.Generic.List Troubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] Video { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo) })] + System.Collections.Generic.List Video { get; set; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Group of Videos", SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] VideoGroup { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup) })] + System.Collections.Generic.List VideoGroup { get; set; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution AzureKB results", SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] WebResult { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult) })] + System.Collections.Generic.List WebResult { get; set; } } /// Solution replacement maps. @@ -124,19 +142,19 @@ internal partial interface IReplacementMapsInternal { /// Solution diagnostics results. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] Diagnostic { get; set; } + System.Collections.Generic.List Diagnostic { get; set; } /// Solution metrics based charts - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] MetricsBasedChart { get; set; } + System.Collections.Generic.List MetricsBasedChart { get; set; } /// Solutions Troubleshooters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] Troubleshooter { get; set; } + System.Collections.Generic.List Troubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] Video { get; set; } + System.Collections.Generic.List Video { get; set; } /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] VideoGroup { get; set; } + System.Collections.Generic.List VideoGroup { get; set; } /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] WebResult { get; set; } + System.Collections.Generic.List WebResult { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMaps.json.cs similarity index 77% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMaps.json.cs index 1715bf2f98db..9c86177f2770 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMaps.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMaps.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ReplacementMaps partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ReplacementMaps(json) : null; } @@ -77,12 +77,12 @@ internal ReplacementMaps(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Jso { return; } - {_webResult = If( json?.PropertyT("webResults"), out var __jsonWebResults) ? If( __jsonWebResults as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResult.FromJson(__u) )) ))() : null : WebResult;} - {_diagnostic = If( json?.PropertyT("diagnostics"), out var __jsonDiagnostics) ? If( __jsonDiagnostics as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnostic.FromJson(__p) )) ))() : null : Diagnostic;} - {_troubleshooter = If( json?.PropertyT("troubleshooters"), out var __jsonTroubleshooters) ? If( __jsonTroubleshooters as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshooters.FromJson(__k) )) ))() : null : Troubleshooter;} - {_metricsBasedChart = If( json?.PropertyT("metricsBasedCharts"), out var __jsonMetricsBasedCharts) ? If( __jsonMetricsBasedCharts as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __g) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__g, (__f)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChart.FromJson(__f) )) ))() : null : MetricsBasedChart;} - {_video = If( json?.PropertyT("videos"), out var __jsonVideos) ? If( __jsonVideos as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __b) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__b, (__a)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Video.FromJson(__a) )) ))() : null : Video;} - {_videoGroup = If( json?.PropertyT("videoGroups"), out var __jsonVideoGroups) ? If( __jsonVideoGroups as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var ___w) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(___w, (___v)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroup.FromJson(___v) )) ))() : null : VideoGroup;} + {_webResult = If( json?.PropertyT("webResults"), out var __jsonWebResults) ? If( __jsonWebResults as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResult.FromJson(__u) )) ))() : null : _webResult;} + {_diagnostic = If( json?.PropertyT("diagnostics"), out var __jsonDiagnostics) ? If( __jsonDiagnostics as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsDiagnostic.FromJson(__p) )) ))() : null : _diagnostic;} + {_troubleshooter = If( json?.PropertyT("troubleshooters"), out var __jsonTroubleshooters) ? If( __jsonTroubleshooters as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTroubleshooters.FromJson(__k) )) ))() : null : _troubleshooter;} + {_metricsBasedChart = If( json?.PropertyT("metricsBasedCharts"), out var __jsonMetricsBasedCharts) ? If( __jsonMetricsBasedCharts as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __g) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__g, (__f)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.MetricsBasedChart.FromJson(__f) )) ))() : null : _metricsBasedChart;} + {_video = If( json?.PropertyT("videos"), out var __jsonVideos) ? If( __jsonVideos as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __b) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__b, (__a)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Video.FromJson(__a) )) ))() : null : _video;} + {_videoGroup = If( json?.PropertyT("videoGroups"), out var __jsonVideoGroups) ? If( __jsonVideoGroups as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var ___w) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(___w, (___v)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroup.FromJson(___v) )) ))() : null : _videoGroup;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMapsSelfHelp.PowerShell.cs similarity index 65% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMapsSelfHelp.PowerShell.cs index 4b5834025af8..bb1c47d0e693 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMapsSelfHelp.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class ReplacementMapsSelfHelp partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ReplacementMapsSelfHelp(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ReplacementMapsSelfHelp(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +111,21 @@ internal ReplacementMapsSelfHelp(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("WebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).WebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).WebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)this).WebResult = (System.Collections.Generic.List) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)this).WebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("Video")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)this).Video = (System.Collections.Generic.List) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)this).Video, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); } if (content.Contains("VideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).VideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)this).VideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +140,15 @@ internal ReplacementMapsSelfHelp(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("WebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).WebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).WebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)this).WebResult = (System.Collections.Generic.List) content.GetValueForProperty("WebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)this).WebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("Video")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)this).Video = (System.Collections.Generic.List) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)this).Video, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); } if (content.Contains("VideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).VideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)this).VideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("VideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)this).VideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMapsSelfHelp.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMapsSelfHelp.TypeConverter.cs index 2bcc2cfd9cf2..a6ea322a95b6 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMapsSelfHelp.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMapsSelfHelp.cs similarity index 59% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMapsSelfHelp.cs index 8cf64eb19b08..f728f0fa461f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMapsSelfHelp.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.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Solution replacement maps. public partial class ReplacementMapsSelfHelp : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] _video; + private System.Collections.Generic.List _video; /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] Video { get => this._video; set => this._video = value; } + public System.Collections.Generic.List Video { get => this._video; set => this._video = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] _videoGroup; + private System.Collections.Generic.List _videoGroup; /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] VideoGroup { get => this._videoGroup; set => this._videoGroup = value; } + public System.Collections.Generic.List VideoGroup { get => this._videoGroup; set => this._videoGroup = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] _webResult; + private System.Collections.Generic.List _webResult; /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] WebResult { get => this._webResult; set => this._webResult = value; } + public System.Collections.Generic.List WebResult { get => this._webResult; set => this._webResult = value; } /// Creates an new instance. public ReplacementMapsSelfHelp() @@ -52,26 +52,35 @@ public partial interface IReplacementMapsSelfHelp : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] Video { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo) })] + System.Collections.Generic.List Video { get; set; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Group of Videos", SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] VideoGroup { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup) })] + System.Collections.Generic.List VideoGroup { get; set; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution AzureKB results", SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] WebResult { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult) })] + System.Collections.Generic.List WebResult { get; set; } } /// Solution replacement maps. @@ -81,11 +90,11 @@ internal partial interface IReplacementMapsSelfHelpInternal /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] Video { get; set; } + System.Collections.Generic.List Video { get; set; } /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] VideoGroup { get; set; } + System.Collections.Generic.List VideoGroup { get; set; } /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] WebResult { get; set; } + System.Collections.Generic.List WebResult { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMapsSelfHelp.json.cs similarity index 83% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMapsSelfHelp.json.cs index cd79f67c0bff..dae11bf54e0e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ReplacementMapsSelfHelp.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ReplacementMapsSelfHelp.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ReplacementMapsSelfHelp partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ReplacementMapsSelfHelp(json) : null; } @@ -77,9 +77,9 @@ internal ReplacementMapsSelfHelp(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Run { return; } - {_webResult = If( json?.PropertyT("webResults"), out var __jsonWebResults) ? If( __jsonWebResults as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResult.FromJson(__u) )) ))() : null : WebResult;} - {_video = If( json?.PropertyT("videos"), out var __jsonVideos) ? If( __jsonVideos as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Video.FromJson(__p) )) ))() : null : Video;} - {_videoGroup = If( json?.PropertyT("videoGroups"), out var __jsonVideoGroups) ? If( __jsonVideoGroups as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroup.FromJson(__k) )) ))() : null : VideoGroup;} + {_webResult = If( json?.PropertyT("webResults"), out var __jsonWebResults) ? If( __jsonWebResults as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResult.FromJson(__u) )) ))() : null : _webResult;} + {_video = If( json?.PropertyT("videos"), out var __jsonVideos) ? If( __jsonVideos as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Video.FromJson(__p) )) ))() : null : _video;} + {_videoGroup = If( json?.PropertyT("videoGroups"), out var __jsonVideoGroups) ? If( __jsonVideoGroups as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroup.FromJson(__k) )) ))() : null : _videoGroup;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Resource.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Resource.PowerShell.cs similarity index 60% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Resource.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Resource.PowerShell.cs index 86e727bfe0bd..a2de65ec9f8e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Resource.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Resource(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,49 +113,49 @@ internal Resource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SystemData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Resource.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Resource.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Resource.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Resource.TypeConverter.cs index 4f7385bbb2df..1ccd0c26df9b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Resource.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Resource.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Resource.cs similarity index 61% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Resource.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Resource.cs index c594ae093d2e..feb186df1a62 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Resource.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40 /// Common fields that are returned in the response for all Azure Resource Manager resources /// public partial class Resource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.ISystemData _systemData; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData _systemData; /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemData()); } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).CreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).CreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).CreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).LastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).LastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)SystemData).LastModifiedByType; } /// Backing field for property. private string _type; @@ -101,6 +119,9 @@ public partial interface IResource : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.Models.Api40.ISystemData SystemData { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Resource.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Resource.json.cs similarity index 90% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Resource.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Resource.json.cs index d831d2f597ff..99bc8f6c3461 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/Resource.json.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -56,13 +56,11 @@ public partial class Resource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResource. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResource. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Resource(json) : null; } @@ -79,10 +77,10 @@ internal Resource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonO { return; } - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.SelfHelp.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 +103,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseOption.PowerShell.cs similarity index 80% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseOption.PowerShell.cs index 8f5c053bb012..cb56cfa6139d 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseOption.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class ResponseOption partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOption DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResponseOption(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResponseOption(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,17 +111,17 @@ internal ResponseOption(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Key")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Key, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOptionInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOptionInternal)this).Key, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOptionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOptionInternal)this).Value, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -136,11 +136,11 @@ internal ResponseOption(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Key")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Key, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOptionInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOptionInternal)this).Key, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOptionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOptionInternal)this).Value, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseOption.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseOption.TypeConverter.cs index 930218e060a6..5f0f91539c65 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseOption.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOption ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOption).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseOption.cs similarity index 87% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseOption.cs index 37022682bf77..72afb0ad1b66 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseOption.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// The status of the resource. public partial class ResponseOption : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOptionInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOption, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOptionInternal { /// Backing field for property. @@ -41,6 +41,9 @@ public partial interface IResponseOption : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Unique string.", SerializedName = @"key", PossibleTypes = new [] { typeof(string) })] @@ -49,6 +52,9 @@ public partial interface IResponseOption : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Option description", SerializedName = @"value", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseOption.json.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseOption.json.cs index 9ad1d8a06068..e36956792cd9 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseOption.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseOption.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ResponseOption partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOption. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOption. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOption FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ResponseOption(json) : null; } @@ -77,8 +77,8 @@ internal ResponseOption(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json { return; } - {_key = If( json?.PropertyT("key"), out var __jsonKey) ? (string)__jsonKey : (string)Key;} - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + {_key = If( json?.PropertyT("key"), out var __jsonKey) ? (string)__jsonKey : (string)_key;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)_value;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseValidationProperties.PowerShell.cs similarity index 67% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseValidationProperties.PowerShell.cs index cc47e4d3e0ac..6a6fce3be76b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseValidationProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class ResponseValidationProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResponseValidationProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResponseValidationProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,29 +111,29 @@ internal ResponseValidationProperties(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("Regex")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).Regex = (string) content.GetValueForProperty("Regex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).Regex, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).Regex = (string) content.GetValueForProperty("Regex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).Regex, global::System.Convert.ToString); } if (content.Contains("ValidationScope")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationScope = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope?) content.GetValueForProperty("ValidationScope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationScope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).ValidationScope = (string) content.GetValueForProperty("ValidationScope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).ValidationScope, global::System.Convert.ToString); } if (content.Contains("IsRequired")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).IsRequired = (bool?) content.GetValueForProperty("IsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).IsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).IsRequired = (bool?) content.GetValueForProperty("IsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).IsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ValidationErrorMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationErrorMessage = (string) content.GetValueForProperty("ValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationErrorMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).ValidationErrorMessage = (string) content.GetValueForProperty("ValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).ValidationErrorMessage, global::System.Convert.ToString); } if (content.Contains("MaxLength")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).MaxLength = (long?) content.GetValueForProperty("MaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).MaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).MaxLength = (long?) content.GetValueForProperty("MaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).MaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -150,23 +148,23 @@ internal ResponseValidationProperties(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("Regex")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).Regex = (string) content.GetValueForProperty("Regex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).Regex, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).Regex = (string) content.GetValueForProperty("Regex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).Regex, global::System.Convert.ToString); } if (content.Contains("ValidationScope")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationScope = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope?) content.GetValueForProperty("ValidationScope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationScope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).ValidationScope = (string) content.GetValueForProperty("ValidationScope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).ValidationScope, global::System.Convert.ToString); } if (content.Contains("IsRequired")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).IsRequired = (bool?) content.GetValueForProperty("IsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).IsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).IsRequired = (bool?) content.GetValueForProperty("IsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).IsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ValidationErrorMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationErrorMessage = (string) content.GetValueForProperty("ValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).ValidationErrorMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).ValidationErrorMessage = (string) content.GetValueForProperty("ValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).ValidationErrorMessage, global::System.Convert.ToString); } if (content.Contains("MaxLength")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).MaxLength = (long?) content.GetValueForProperty("MaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)this).MaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).MaxLength = (long?) content.GetValueForProperty("MaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)this).MaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseValidationProperties.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseValidationProperties.TypeConverter.cs index 666a3d637109..9ac289dacde0 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseValidationProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseValidationProperties.cs similarity index 80% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseValidationProperties.cs index 60e3e098b013..e9d5607c801c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseValidationProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Troubleshooter step input response validation properties public partial class ResponseValidationProperties : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal { /// Backing field for property. @@ -42,11 +42,11 @@ public partial class ResponseValidationProperties : public string ValidationErrorMessage { get => this._validationErrorMessage; set => this._validationErrorMessage = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? _validationScope; + private string _validationScope; /// Validation scope [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? ValidationScope { get => this._validationScope; set => this._validationScope = value; } + public string ValidationScope { get => this._validationScope; set => this._validationScope = value; } /// Creates an new instance. public ResponseValidationProperties() @@ -62,6 +62,9 @@ public partial interface IResponseValidationProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Default True", SerializedName = @"isRequired", PossibleTypes = new [] { typeof(bool) })] @@ -70,6 +73,9 @@ public partial interface IResponseValidationProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Max text input (open Ended Text).", SerializedName = @"maxLength", PossibleTypes = new [] { typeof(long) })] @@ -78,6 +84,9 @@ public partial interface IResponseValidationProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Regex used for the input validation.", SerializedName = @"regex", PossibleTypes = new [] { typeof(string) })] @@ -86,6 +95,9 @@ public partial interface IResponseValidationProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Validation Error Message.", SerializedName = @"validationErrorMessage", PossibleTypes = new [] { typeof(string) })] @@ -94,10 +106,14 @@ public partial interface IResponseValidationProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Validation scope", SerializedName = @"validationScope", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? ValidationScope { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("None", "URLFormat", "GuidFormat", "IpAddressFormat", "NumberOnlyFormat")] + string ValidationScope { get; set; } } /// Troubleshooter step input response validation properties @@ -113,7 +129,8 @@ internal partial interface IResponseValidationPropertiesInternal /// Validation Error Message. string ValidationErrorMessage { get; set; } /// Validation scope - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? ValidationScope { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("None", "URLFormat", "GuidFormat", "IpAddressFormat", "NumberOnlyFormat")] + string ValidationScope { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseValidationProperties.json.cs similarity index 92% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseValidationProperties.json.cs index d59750742ae5..fede87f795d0 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/ResponseValidationProperties.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/ResponseValidationProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ResponseValidationProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new ResponseValidationProperties(json) : null; } @@ -77,11 +77,11 @@ internal ResponseValidationProperties(Microsoft.Azure.PowerShell.Cmdlets.SelfHel { return; } - {_regex = If( json?.PropertyT("regex"), out var __jsonRegex) ? (string)__jsonRegex : (string)Regex;} - {_validationScope = If( json?.PropertyT("validationScope"), out var __jsonValidationScope) ? (string)__jsonValidationScope : (string)ValidationScope;} - {_isRequired = If( json?.PropertyT("isRequired"), out var __jsonIsRequired) ? (bool?)__jsonIsRequired : IsRequired;} - {_validationErrorMessage = If( json?.PropertyT("validationErrorMessage"), out var __jsonValidationErrorMessage) ? (string)__jsonValidationErrorMessage : (string)ValidationErrorMessage;} - {_maxLength = If( json?.PropertyT("maxLength"), out var __jsonMaxLength) ? (long?)__jsonMaxLength : MaxLength;} + {_regex = If( json?.PropertyT("regex"), out var __jsonRegex) ? (string)__jsonRegex : (string)_regex;} + {_validationScope = If( json?.PropertyT("validationScope"), out var __jsonValidationScope) ? (string)__jsonValidationScope : (string)_validationScope;} + {_isRequired = If( json?.PropertyT("isRequired"), out var __jsonIsRequired) ? (bool?)__jsonIsRequired : _isRequired;} + {_validationErrorMessage = If( json?.PropertyT("validationErrorMessage"), out var __jsonValidationErrorMessage) ? (string)__jsonValidationErrorMessage : (string)_validationErrorMessage;} + {_maxLength = If( json?.PropertyT("maxLength"), out var __jsonMaxLength) ? (long?)__jsonMaxLength : _maxLength;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/RestartTroubleshooterResponse.PowerShell.cs similarity index 78% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/RestartTroubleshooterResponse.PowerShell.cs index 274d42b88167..9845617480f0 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/RestartTroubleshooterResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class RestartTroubleshooterResponse partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new RestartTroubleshooterResponse(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new RestartTroubleshooterResponse(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +111,17 @@ internal RestartTroubleshooterResponse(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("TroubleshooterResourceName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName = (string) content.GetValueForProperty("TroubleshooterResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName = (string) content.GetValueForProperty("TroubleshooterResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponseInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponseInternal)this).Location, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,11 +136,11 @@ internal RestartTroubleshooterResponse(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("TroubleshooterResourceName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName = (string) content.GetValueForProperty("TroubleshooterResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName = (string) content.GetValueForProperty("TroubleshooterResourceName",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponseInternal)this).TroubleshooterResourceName, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponseInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponseInternal)this).Location, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/RestartTroubleshooterResponse.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/RestartTroubleshooterResponse.TypeConverter.cs index 824e5c1ebc66..237bbfc7dd8a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/RestartTroubleshooterResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/RestartTroubleshooterResponse.cs similarity index 81% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/RestartTroubleshooterResponse.cs index c0d93eab6bef..28824c1b21dc 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/RestartTroubleshooterResponse.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Troubleshooter restart response public partial class RestartTroubleshooterResponse : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponseInternal, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IHeaderSerializable { @@ -21,7 +21,7 @@ public partial class RestartTroubleshooterResponse : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for TroubleshooterResourceName - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal.TroubleshooterResourceName { get => this._troubleshooterResourceName; set { {_troubleshooterResourceName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponseInternal.TroubleshooterResourceName { get => this._troubleshooterResourceName; set { {_troubleshooterResourceName = value;} } } /// Backing field for property. private string _troubleshooterResourceName; @@ -35,7 +35,7 @@ void Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IHeaderSerializable.Rea { if (headers.TryGetValues("Location", out var __locationHeader0)) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponseInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponseInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; } } @@ -52,6 +52,9 @@ public partial interface IRestartTroubleshooterResponse : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"Location", PossibleTypes = new [] { typeof(string) })] @@ -60,6 +63,9 @@ public partial interface IRestartTroubleshooterResponse : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Updated TroubleshooterResource Name .", SerializedName = @"troubleshooterResourceName", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/RestartTroubleshooterResponse.json.cs similarity index 93% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/RestartTroubleshooterResponse.json.cs index bc753cc33466..1cfdd2cdaa96 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/RestartTroubleshooterResponse.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/RestartTroubleshooterResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class RestartTroubleshooterResponse partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new RestartTroubleshooterResponse(json) : null; } @@ -77,7 +77,7 @@ internal RestartTroubleshooterResponse(Microsoft.Azure.PowerShell.Cmdlets.SelfHe { return; } - {_troubleshooterResourceName = If( json?.PropertyT("troubleshooterResourceName"), out var __jsonTroubleshooterResourceName) ? (string)__jsonTroubleshooterResourceName : (string)TroubleshooterResourceName;} + {_troubleshooterResourceName = If( json?.PropertyT("troubleshooterResourceName"), out var __jsonTroubleshooterResourceName) ? (string)__jsonTroubleshooterResourceName : (string)_troubleshooterResourceName;} AfterFromJson(json); } @@ -100,7 +100,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._troubleshooterResourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._troubleshooterResourceName.ToString()) : null, "troubleshooterResourceName" ,container.Add ); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SearchResult.PowerShell.cs similarity index 64% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SearchResult.PowerShell.cs index 3fb83550a874..1e5cb4716644 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SearchResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class SearchResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SearchResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SearchResult(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,41 +111,41 @@ internal SearchResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Confidence")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Confidence = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence?) content.GetValueForProperty("Confidence",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Confidence, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Confidence = (string) content.GetValueForProperty("Confidence",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Confidence, global::System.Convert.ToString); } if (content.Contains("Source")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Source, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Source, global::System.Convert.ToString); } if (content.Contains("ResultType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).ResultType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType?) content.GetValueForProperty("ResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).ResultType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).ResultType = (string) content.GetValueForProperty("ResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).ResultType, global::System.Convert.ToString); } if (content.Contains("Rank")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Rank = (int?) content.GetValueForProperty("Rank",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Rank, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Rank = (int?) content.GetValueForProperty("Rank",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Rank, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Link")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Link = (string) content.GetValueForProperty("Link",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Link, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Link = (string) content.GetValueForProperty("Link",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Link, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -160,35 +160,35 @@ internal SearchResult(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Confidence")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Confidence = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence?) content.GetValueForProperty("Confidence",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Confidence, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Confidence = (string) content.GetValueForProperty("Confidence",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Confidence, global::System.Convert.ToString); } if (content.Contains("Source")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Source, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Source, global::System.Convert.ToString); } if (content.Contains("ResultType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).ResultType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType?) content.GetValueForProperty("ResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).ResultType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).ResultType = (string) content.GetValueForProperty("ResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).ResultType, global::System.Convert.ToString); } if (content.Contains("Rank")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Rank = (int?) content.GetValueForProperty("Rank",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Rank, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Rank = (int?) content.GetValueForProperty("Rank",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Rank, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Link")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Link = (string) content.GetValueForProperty("Link",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal)this).Link, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Link = (string) content.GetValueForProperty("Link",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal)this).Link, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SearchResult.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SearchResult.TypeConverter.cs index 72d4376fd5fb..4db0f5310de1 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SearchResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SearchResult.cs similarity index 80% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SearchResult.cs index ec29ada69936..342a89f545ef 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SearchResult.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Details of an AzureKB search result. public partial class SearchResult : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResultInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResult, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResultInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence? _confidence; + private string _confidence; /// Confidence of the search result. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence? Confidence { get => this._confidence; set => this._confidence = value; } + public string Confidence { get => this._confidence; set => this._confidence = value; } /// Backing field for property. private string _content; @@ -42,11 +42,11 @@ public partial class SearchResult : public int? Rank { get => this._rank; set => this._rank = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType? _resultType; + private string _resultType; /// Result type of the search result. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType? ResultType { get => this._resultType; set => this._resultType = value; } + public string ResultType { get => this._resultType; set => this._resultType = value; } /// Backing field for property. private string _solutionId; @@ -83,14 +83,21 @@ public partial interface ISearchResult : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Confidence of the search result.", SerializedName = @"confidence", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence? Confidence { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Low", "Medium", "High")] + string Confidence { get; set; } /// Content of the search result. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Content of the search result.", SerializedName = @"content", PossibleTypes = new [] { typeof(string) })] @@ -99,6 +106,9 @@ public partial interface ISearchResult : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the document.", SerializedName = @"link", PossibleTypes = new [] { typeof(string) })] @@ -107,6 +117,9 @@ public partial interface ISearchResult : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"rank of the search result", SerializedName = @"rank", PossibleTypes = new [] { typeof(int) })] @@ -115,14 +128,21 @@ public partial interface ISearchResult : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result type of the search result.", SerializedName = @"resultType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType? ResultType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Community", "Documentation")] + string ResultType { get; set; } /// Unique id of the result. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Unique id of the result.", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] @@ -131,6 +151,9 @@ public partial interface ISearchResult : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Source of the search result.", SerializedName = @"source", PossibleTypes = new [] { typeof(string) })] @@ -139,6 +162,9 @@ public partial interface ISearchResult : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Title of the search result.", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] @@ -150,7 +176,8 @@ internal partial interface ISearchResultInternal { /// Confidence of the search result. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence? Confidence { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Low", "Medium", "High")] + string Confidence { get; set; } /// Content of the search result. string Content { get; set; } /// Link to the document. @@ -158,7 +185,8 @@ internal partial interface ISearchResultInternal /// rank of the search result int? Rank { get; set; } /// Result type of the search result. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType? ResultType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Community", "Documentation")] + string ResultType { get; set; } /// Unique id of the result. string SolutionId { get; set; } /// Source of the search result. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SearchResult.json.cs similarity index 93% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SearchResult.json.cs index 78d83311e64c..b3dfb7af321c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SearchResult.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SearchResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SearchResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SearchResult(json) : null; } @@ -77,14 +77,14 @@ internal SearchResult(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.J { return; } - {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} - {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)Content;} - {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} - {_confidence = If( json?.PropertyT("confidence"), out var __jsonConfidence) ? (string)__jsonConfidence : (string)Confidence;} - {_source = If( json?.PropertyT("source"), out var __jsonSource) ? (string)__jsonSource : (string)Source;} - {_resultType = If( json?.PropertyT("resultType"), out var __jsonResultType) ? (string)__jsonResultType : (string)ResultType;} - {_rank = If( json?.PropertyT("rank"), out var __jsonRank) ? (int?)__jsonRank : Rank;} - {_link = If( json?.PropertyT("link"), out var __jsonLink) ? (string)__jsonLink : (string)Link;} + {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)_solutionId;} + {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)_content;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)_title;} + {_confidence = If( json?.PropertyT("confidence"), out var __jsonConfidence) ? (string)__jsonConfidence : (string)_confidence;} + {_source = If( json?.PropertyT("source"), out var __jsonSource) ? (string)__jsonSource : (string)_source;} + {_resultType = If( json?.PropertyT("resultType"), out var __jsonResultType) ? (string)__jsonResultType : (string)_resultType;} + {_rank = If( json?.PropertyT("rank"), out var __jsonRank) ? (int?)__jsonRank : _rank;} + {_link = If( json?.PropertyT("link"), out var __jsonLink) ? (string)__jsonLink : (string)_link;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Section.PowerShell.cs similarity index 51% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Section.PowerShell.cs index d13be5a6a251..ed154856478b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Section.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Section partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISection DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Section(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Section(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,45 +111,45 @@ internal Section(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsTypeConverter.ConvertFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapDiagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapDiagnostic = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapTroubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapTroubleshooter = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapMetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapMetricsBasedChart = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.MetricsBasedChartTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -164,39 +164,39 @@ internal Section(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsTypeConverter.ConvertFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapDiagnostic")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[]) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsDiagnosticTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapDiagnostic = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsDiagnosticTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapTroubleshooter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapTroubleshooter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[]) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapTroubleshooter = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTroubleshootersTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapMetricsBasedChart")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapMetricsBasedChart = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[]) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.MetricsBasedChartTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapMetricsBasedChart = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.MetricsBasedChartTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Section.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Section.TypeConverter.cs index d910bf950d97..9c493aa24ae1 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Section.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Section.cs similarity index 54% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Section.cs index eb0b3e80d33c..6df2b28addf6 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Section.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Part of the solution and are dividers in the solution rendering. public partial class Section : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISection, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal { /// Backing field for property. @@ -21,40 +21,40 @@ public partial class Section : public string Content { get => this._content; set => this._content = value; } /// Internal Acessors for ReplacementMap - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMaps()); set { {_replacementMap = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMaps()); set { {_replacementMap = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps _replacementMap; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps _replacementMap; /// Solution replacement maps. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMaps()); set => this._replacementMap = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMaps()); set => this._replacementMap = value; } /// Solution diagnostics results. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Diagnostic = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Diagnostic = value ?? null /* arrayOf */; } /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart = value ?? null /* arrayOf */; } /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Troubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Troubleshooter = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Troubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Troubleshooter = value ?? null /* arrayOf */; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } /// Backing field for property. private string _title; @@ -77,6 +77,9 @@ public partial interface ISection : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution sections content.", SerializedName = @"content", PossibleTypes = new [] { typeof(string) })] @@ -85,56 +88,77 @@ public partial interface ISection : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution diagnostics results.", SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic) })] + System.Collections.Generic.List ReplacementMapDiagnostic { get; set; } /// Solution metrics based charts [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution metrics based charts", SerializedName = @"metricsBasedCharts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart) })] + System.Collections.Generic.List ReplacementMapMetricsBasedChart { get; set; } /// Solutions Troubleshooters [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solutions Troubleshooters", SerializedName = @"troubleshooters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters) })] + System.Collections.Generic.List ReplacementMapTroubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo) })] + System.Collections.Generic.List ReplacementMapVideo { get; set; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Group of Videos", SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup) })] + System.Collections.Generic.List ReplacementMapVideoGroup { get; set; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution AzureKB results", SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult) })] + System.Collections.Generic.List ReplacementMapWebResult { get; set; } /// Solution sections title. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution sections title.", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] @@ -148,21 +172,21 @@ internal partial interface ISectionInternal /// Solution sections content. string Content { get; set; } /// Solution replacement maps. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMaps ReplacementMap { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps ReplacementMap { get; set; } /// Solution diagnostics results. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic[] ReplacementMapDiagnostic { get; set; } + System.Collections.Generic.List ReplacementMapDiagnostic { get; set; } /// Solution metrics based charts - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IMetricsBasedChart[] ReplacementMapMetricsBasedChart { get; set; } + System.Collections.Generic.List ReplacementMapMetricsBasedChart { get; set; } /// Solutions Troubleshooters - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters[] ReplacementMapTroubleshooter { get; set; } + System.Collections.Generic.List ReplacementMapTroubleshooter { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } + System.Collections.Generic.List ReplacementMapVideo { get; set; } /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + System.Collections.Generic.List ReplacementMapVideoGroup { get; set; } /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } + System.Collections.Generic.List ReplacementMapWebResult { get; set; } /// Solution sections title. string Title { get; set; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Section.json.cs similarity index 91% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Section.json.cs index e83530f9f3d7..751c820e188b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Section.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Section.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Section partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISection. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISection. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISection FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Section(json) : null; } @@ -77,9 +75,9 @@ internal Section(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonOb { return; } - {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMaps.FromJson(__jsonReplacementMaps) : ReplacementMap;} - {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} - {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)Content;} + {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMaps.FromJson(__jsonReplacementMaps) : _replacementMap;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)_title;} + {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)_content;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SectionSelfHelp.PowerShell.cs similarity index 59% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SectionSelfHelp.PowerShell.cs index 7e67cc3027c6..88859172480b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SectionSelfHelp.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class SectionSelfHelp partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelp DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SectionSelfHelp(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelp DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SectionSelfHelp(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelp FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,33 +111,33 @@ internal SectionSelfHelp(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -152,27 +152,27 @@ internal SectionSelfHelp(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SectionSelfHelp.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SectionSelfHelp.TypeConverter.cs index f3ba4894f7df..c89657aaae8f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SectionSelfHelp.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelp ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelp).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SectionSelfHelp.cs similarity index 60% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SectionSelfHelp.cs index 96814c7d37db..46ffd1fd9f50 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SectionSelfHelp.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Part of the solution and are dividers in the solution rendering. public partial class SectionSelfHelp : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelp, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal { /// Backing field for property. @@ -21,28 +21,28 @@ public partial class SectionSelfHelp : public string Content { get => this._content; set => this._content = value; } /// Internal Acessors for ReplacementMap - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelpInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelp()); set { {_replacementMap = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelpInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsSelfHelp()); set { {_replacementMap = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp _replacementMap; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp _replacementMap; /// Solution replacement maps. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelp()); set => this._replacementMap = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsSelfHelp()); set => this._replacementMap = value; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } /// Backing field for property. private string _title; @@ -65,6 +65,9 @@ public partial interface ISectionSelfHelp : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution sections content.", SerializedName = @"content", PossibleTypes = new [] { typeof(string) })] @@ -75,30 +78,42 @@ public partial interface ISectionSelfHelp : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo) })] + System.Collections.Generic.List ReplacementMapVideo { get; set; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Group of Videos", SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup) })] + System.Collections.Generic.List ReplacementMapVideoGroup { get; set; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution AzureKB results", SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult) })] + System.Collections.Generic.List ReplacementMapWebResult { get; set; } /// Solution sections title. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution sections title.", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] @@ -112,15 +127,15 @@ internal partial interface ISectionSelfHelpInternal /// Solution sections content. string Content { get; set; } /// Solution replacement maps. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp ReplacementMap { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp ReplacementMap { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } + System.Collections.Generic.List ReplacementMapVideo { get; set; } /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + System.Collections.Generic.List ReplacementMapVideoGroup { get; set; } /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } + System.Collections.Generic.List ReplacementMapWebResult { get; set; } /// Solution sections title. string Title { get; set; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SectionSelfHelp.json.cs similarity index 92% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SectionSelfHelp.json.cs index 8037fcb26b6d..f44805d4ab95 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SectionSelfHelp.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SectionSelfHelp.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SectionSelfHelp partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelp. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelp. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelp FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SectionSelfHelp(json) : null; } @@ -77,9 +77,9 @@ internal SectionSelfHelp(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Jso { return; } - {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelp.FromJson(__jsonReplacementMaps) : ReplacementMap;} - {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} - {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)Content;} + {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsSelfHelp.FromJson(__jsonReplacementMaps) : _replacementMap;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)_title;} + {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)_content;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.cs index ae78887f0245..d483ca40ce8a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.cs @@ -85,6 +85,9 @@ public partial interface ISelfHelpIdentity : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Unique resource name for insight resources", SerializedName = @"diagnosticsResourceName", PossibleTypes = new [] { typeof(string) })] @@ -93,6 +96,9 @@ public partial interface ISelfHelpIdentity : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource identity path", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -103,6 +109,9 @@ public partial interface ISelfHelpIdentity : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] @@ -111,6 +120,9 @@ public partial interface ISelfHelpIdentity : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Simplified Solutions Resource Name.", SerializedName = @"simplifiedSolutionsResourceName", PossibleTypes = new [] { typeof(string) })] @@ -121,6 +133,9 @@ public partial interface ISelfHelpIdentity : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] @@ -129,6 +144,9 @@ public partial interface ISelfHelpIdentity : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution resource Name.", SerializedName = @"solutionResourceName", PossibleTypes = new [] { typeof(string) })] @@ -137,6 +155,9 @@ public partial interface ISelfHelpIdentity : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The ID of the target subscription. The value must be an UUID.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] @@ -145,6 +166,9 @@ public partial interface ISelfHelpIdentity : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Troubleshooter resource Name.", SerializedName = @"troubleshooterName", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.json.cs index a123a20415e3..6d90c4a20b5d 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SelfHelpIdentity.json.cs @@ -76,14 +76,14 @@ internal SelfHelpIdentity(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Js { return; } - {_scope = If( json?.PropertyT("scope"), out var __jsonScope) ? (string)__jsonScope : (string)Scope;} - {_diagnosticsResourceName = If( json?.PropertyT("diagnosticsResourceName"), out var __jsonDiagnosticsResourceName) ? (string)__jsonDiagnosticsResourceName : (string)DiagnosticsResourceName;} - {_solutionResourceName = If( json?.PropertyT("solutionResourceName"), out var __jsonSolutionResourceName) ? (string)__jsonSolutionResourceName : (string)SolutionResourceName;} - {_simplifiedSolutionsResourceName = If( json?.PropertyT("simplifiedSolutionsResourceName"), out var __jsonSimplifiedSolutionsResourceName) ? (string)__jsonSimplifiedSolutionsResourceName : (string)SimplifiedSolutionsResourceName;} - {_troubleshooterName = If( json?.PropertyT("troubleshooterName"), out var __jsonTroubleshooterName) ? (string)__jsonTroubleshooterName : (string)TroubleshooterName;} - {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} - {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_scope = If( json?.PropertyT("scope"), out var __jsonScope) ? (string)__jsonScope : (string)_scope;} + {_diagnosticsResourceName = If( json?.PropertyT("diagnosticsResourceName"), out var __jsonDiagnosticsResourceName) ? (string)__jsonDiagnosticsResourceName : (string)_diagnosticsResourceName;} + {_solutionResourceName = If( json?.PropertyT("solutionResourceName"), out var __jsonSolutionResourceName) ? (string)__jsonSolutionResourceName : (string)_solutionResourceName;} + {_simplifiedSolutionsResourceName = If( json?.PropertyT("simplifiedSolutionsResourceName"), out var __jsonSimplifiedSolutionsResourceName) ? (string)__jsonSimplifiedSolutionsResourceName : (string)_simplifiedSolutionsResourceName;} + {_troubleshooterName = If( json?.PropertyT("troubleshooterName"), out var __jsonTroubleshooterName) ? (string)__jsonTroubleshooterName : (string)_troubleshooterName;} + {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)_solutionId;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)_subscriptionId;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResource.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResource.PowerShell.cs new file mode 100644 index 000000000000..b3ba44a7abbc --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResource.PowerShell.cs @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Simplified Solutions response. + [System.ComponentModel.TypeConverter(typeof(SimplifiedSolutionsResourceTypeConverter))] + public partial class SimplifiedSolutionsResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SimplifiedSolutionsResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SimplifiedSolutionsResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SimplifiedSolutionsResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Appendix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Appendix = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix) content.GetValueForProperty("Appendix",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Appendix, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesAppendixTypeConverter.ConvertFrom); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SimplifiedSolutionsResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Appendix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Appendix = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix) content.GetValueForProperty("Appendix",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Appendix, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesAppendixTypeConverter.ConvertFrom); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Simplified Solutions response. + [System.ComponentModel.TypeConverter(typeof(SimplifiedSolutionsResourceTypeConverter))] + public partial interface ISimplifiedSolutionsResource + + { + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResource.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResource.TypeConverter.cs index 6dbd02f8f802..60a74ccb255a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResource.cs similarity index 50% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResource.cs index 9c7e3e68a66b..2d14b2cbd27b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResource.cs @@ -3,80 +3,98 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Simplified Solutions response. public partial class SimplifiedSolutionsResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(); /// Additional parameter response for Simplified Solutions [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Appendix; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).Appendix; } /// The HTML content that needs to be rendered and shown to customer. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Content; } + public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).Content; } /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; } - /// Internal Acessors for Appendix - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal.Appendix { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Appendix; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Appendix = value; } + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id = value ?? null; } - /// Internal Acessors for Content - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal.Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Content = value; } + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name = value ?? null; } - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourceProperties()); set { {_property = value;} } } + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).ProvisioningState = value; } + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - /// Internal Acessors for Title - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceInternal.Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Title = value; } + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name = value; } + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData = value; } + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// Internal Acessors for Appendix + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal.Appendix { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).Appendix; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).Appendix = value ?? null /* model class */; } + + /// Internal Acessors for Content + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal.Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).Content = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceInternal.Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).Title = value ?? null; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; } /// Client input parameters to run Simplified Solutions [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Parameter = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).Parameter = value ?? null /* model class */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties _property; /// Simplified Solutions result [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourceProperties()); set => this._property = value; } /// Status of Simplified Solution provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).ProvisioningState; } + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).ProvisioningState; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] @@ -84,47 +102,47 @@ public partial class SimplifiedSolutionsResource : /// Solution Id to identify single Simplified Solution. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).SolutionId = value ?? null; } + public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).SolutionId = value ?? null; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } /// The title. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)Property).Title; } + public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)Property).Title; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; } /// Creates an new instance. public SimplifiedSolutionsResource() @@ -140,27 +158,33 @@ public SimplifiedSolutionsResource() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); } } /// Simplified Solutions response. public partial interface ISimplifiedSolutionsResource : Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource { /// Additional parameter response for Simplified Solutions [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Additional parameter response for Simplified Solutions", SerializedName = @"appendix", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get; } /// The HTML content that needs to be rendered and shown to customer. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The HTML content that needs to be rendered and shown to customer.", SerializedName = @"content", PossibleTypes = new [] { typeof(string) })] @@ -169,22 +193,32 @@ public partial interface ISimplifiedSolutionsResource : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Client input parameters to run Simplified Solutions", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get; set; } /// Status of Simplified Solution provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of Simplified Solution provisioning.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; } /// Solution Id to identify single Simplified Solution. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution Id to identify single Simplified Solution.", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] @@ -193,6 +227,9 @@ public partial interface ISimplifiedSolutionsResource : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The title.", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] @@ -201,18 +238,19 @@ public partial interface ISimplifiedSolutionsResource : } /// Simplified Solutions response. internal partial interface ISimplifiedSolutionsResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResourceInternal { /// Additional parameter response for Simplified Solutions - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get; set; } /// The HTML content that needs to be rendered and shown to customer. string Content { get; set; } /// Client input parameters to run Simplified Solutions - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get; set; } /// Simplified Solutions result - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties Property { get; set; } /// Status of Simplified Solution provisioning. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; set; } /// Solution Id to identify single Simplified Solution. string SolutionId { get; set; } /// The title. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResource.json.cs similarity index 90% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResource.json.cs index 71f83619f6a3..7f39f5c95668 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResource.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SimplifiedSolutionsResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SimplifiedSolutionsResource(json) : null; } @@ -77,8 +77,8 @@ internal SimplifiedSolutionsResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourceProperties.FromJson(__jsonProperties) : Property;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourceProperties.PowerShell.cs similarity index 61% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourceProperties.PowerShell.cs index bd065968625b..df738e9d3dc9 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourceProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SimplifiedSolutionsResourceProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SimplifiedSolutionsResourceProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SimplifiedSolutionsResourceProperties(content); } @@ -98,10 +96,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -116,33 +114,33 @@ internal SimplifiedSolutionsResourceProperties(global::System.Collections.IDicti // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Appendix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Appendix = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix) content.GetValueForProperty("Appendix",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Appendix, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendixTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Appendix = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix) content.GetValueForProperty("Appendix",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Appendix, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesAppendixTypeConverter.ConvertFrom); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -157,27 +155,27 @@ internal SimplifiedSolutionsResourceProperties(global::System.Management.Automat // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Appendix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Appendix = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix) content.GetValueForProperty("Appendix",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Appendix, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendixTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Appendix = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix) content.GetValueForProperty("Appendix",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Appendix, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesAppendixTypeConverter.ConvertFrom); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourceProperties.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourceProperties.TypeConverter.cs index 9bfbf5290693..77538cfa96ae 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourceProperties.cs similarity index 65% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourceProperties.cs index b41ee41e7562..185f64bf9908 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourceProperties.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Simplified Solutions result public partial class SimplifiedSolutionsResourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix _appendix; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix _appendix; /// Additional parameter response for Simplified Solutions [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get => (this._appendix = this._appendix ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendix()); } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get => (this._appendix = this._appendix ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesAppendix()); } /// Backing field for property. private string _content; @@ -28,30 +28,30 @@ public partial class SimplifiedSolutionsResourceProperties : public string Content { get => this._content; } /// Internal Acessors for Appendix - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal.Appendix { get => (this._appendix = this._appendix ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendix()); set { {_appendix = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal.Appendix { get => (this._appendix = this._appendix ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesAppendix()); set { {_appendix = value;} } } /// Internal Acessors for Content - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal.Content { get => this._content; set { {_content = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal.Content { get => this._content; set { {_content = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for Title - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesInternal.Title { get => this._title; set { {_title = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesInternal.Title { get => this._title; set { {_title = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters _parameter; /// Client input parameters to run Simplified Solutions [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParameters()); set => this._parameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesParameters()); set => this._parameter = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? _provisioningState; + private string _provisioningState; /// Status of Simplified Solution provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get => this._provisioningState; } + public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. private string _solutionId; @@ -81,14 +81,20 @@ public partial interface ISimplifiedSolutionsResourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Additional parameter response for Simplified Solutions", SerializedName = @"appendix", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get; } /// The HTML content that needs to be rendered and shown to customer. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The HTML content that needs to be rendered and shown to customer.", SerializedName = @"content", PossibleTypes = new [] { typeof(string) })] @@ -97,22 +103,32 @@ public partial interface ISimplifiedSolutionsResourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Client input parameters to run Simplified Solutions", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get; set; } /// Status of Simplified Solution provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of Simplified Solution provisioning.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; } /// Solution Id to identify single Simplified Solution. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution Id to identify single Simplified Solution.", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] @@ -121,6 +137,9 @@ public partial interface ISimplifiedSolutionsResourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The title.", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] @@ -132,13 +151,14 @@ internal partial interface ISimplifiedSolutionsResourcePropertiesInternal { /// Additional parameter response for Simplified Solutions - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix Appendix { get; set; } /// The HTML content that needs to be rendered and shown to customer. string Content { get; set; } /// Client input parameters to run Simplified Solutions - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get; set; } /// Status of Simplified Solution provisioning. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; set; } /// Solution Id to identify single Simplified Solution. string SolutionId { get; set; } /// The title. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourceProperties.json.cs similarity index 89% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourceProperties.json.cs index 46a16fdb1a4c..8387774c0326 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourceProperties.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SimplifiedSolutionsResourceProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SimplifiedSolutionsResourceProperties(json) : null; } @@ -77,12 +77,12 @@ internal SimplifiedSolutionsResourceProperties(Microsoft.Azure.PowerShell.Cmdlet { return; } - {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} - {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParameters.FromJson(__jsonParameters) : Parameter;} - {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} - {_appendix = If( json?.PropertyT("appendix"), out var __jsonAppendix) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendix.FromJson(__jsonAppendix) : Appendix;} - {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)Content;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)_solutionId;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesParameters.FromJson(__jsonParameters) : _parameter;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)_title;} + {_appendix = If( json?.PropertyT("appendix"), out var __jsonAppendix) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesAppendix.FromJson(__jsonAppendix) : _appendix;} + {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)_content;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } @@ -108,19 +108,19 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( } AddIf( null != (((object)this._solutionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._solutionId.ToString()) : null, "solutionId" ,container.Add ); AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._title)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._title.ToString()) : null, "title" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._appendix ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._appendix.ToJson(null,serializationMode) : null, "appendix" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._content)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._content.ToString()) : null, "content" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.PowerShell.cs similarity index 87% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.PowerShell.cs index 1f88e8a7e144..4a3177efeef1 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class SimplifiedSolutionsResourcePropertiesAppendix partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SimplifiedSolutionsResourcePropertiesAppendix(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SimplifiedSolutionsResourcePropertiesAppendix(content); } @@ -98,10 +98,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -120,7 +120,7 @@ internal SimplifiedSolutionsResourcePropertiesAppendix(global::System.Collection } /// - /// 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/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.TypeConverter.cs index 60428c0b642d..aa230f7671fe 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.cs similarity index 78% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.cs index 57d5430930de..32b9a4b54578 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Additional parameter response for Simplified Solutions public partial class SimplifiedSolutionsResourcePropertiesAppendix : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendixInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendixInternal { /// diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.dictionary.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.dictionary.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.dictionary.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.dictionary.cs index 6769183a2065..42d6779648d5 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.dictionary.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesAppendix source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesAppendix source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.json.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.json.cs index a5855c35c16b..6b5bffdb32a8 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesAppendix.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesAppendix.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SimplifiedSolutionsResourcePropertiesAppendix partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesAppendix FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesAppendix FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SimplifiedSolutionsResourcePropertiesAppendix(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.PowerShell.cs similarity index 87% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.PowerShell.cs index da98ccccdc85..22c49eb5f4d8 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class SimplifiedSolutionsResourcePropertiesParameters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SimplifiedSolutionsResourcePropertiesParameters(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SimplifiedSolutionsResourcePropertiesParameters(content); } @@ -98,10 +98,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -120,7 +120,7 @@ internal SimplifiedSolutionsResourcePropertiesParameters(global::System.Collecti } /// - /// 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/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.TypeConverter.cs index ef726251c8f9..76cab5c8393c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.cs similarity index 78% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.cs index 036191ac1840..66fa77b0951b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Client input parameters to run Simplified Solutions public partial class SimplifiedSolutionsResourcePropertiesParameters : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParametersInternal { /// diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.dictionary.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.dictionary.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.dictionary.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.dictionary.cs index bf0d2b27bb16..59d9f172e368 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.dictionary.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResourcePropertiesParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResourcePropertiesParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.json.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.json.cs index 1df6fb580c3a..6197dc4aaad2 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SimplifiedSolutionsResourcePropertiesParameters.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SimplifiedSolutionsResourcePropertiesParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SimplifiedSolutionsResourcePropertiesParameters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SimplifiedSolutionsResourcePropertiesParameters(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataProperties.PowerShell.cs similarity index 70% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataProperties.PowerShell.cs index a7aa281d57ff..bd04cf01e9cd 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SolutionMetadataProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionMetadataProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionMetadataProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,25 +111,25 @@ internal SolutionMetadataProperties(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("SolutionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType?) content.GetValueForProperty("SolutionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).SolutionType = (string) content.GetValueForProperty("SolutionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).SolutionType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("RequiredInput")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).RequiredInput = (string[]) content.GetValueForProperty("RequiredInput",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).RequiredInput, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).RequiredInput = (System.Collections.Generic.List) content.GetValueForProperty("RequiredInput",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).RequiredInput, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -146,19 +144,19 @@ internal SolutionMetadataProperties(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("SolutionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType?) content.GetValueForProperty("SolutionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).SolutionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).SolutionType = (string) content.GetValueForProperty("SolutionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).SolutionType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("RequiredInput")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).RequiredInput = (string[]) content.GetValueForProperty("RequiredInput",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal)this).RequiredInput, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).RequiredInput = (System.Collections.Generic.List) content.GetValueForProperty("RequiredInput",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal)this).RequiredInput, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataProperties.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataProperties.TypeConverter.cs index dbff4be36bfe..4a6d00e16590 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataProperties.cs similarity index 69% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataProperties.cs index 6c7f8b4bf706..4eb1cccc4d97 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Metadata Properties public partial class SolutionMetadataProperties : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal { /// Backing field for property. @@ -21,20 +21,20 @@ public partial class SolutionMetadataProperties : public string Description { get => this._description; } /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal.Description { get => this._description; set { {_description = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal.Description { get => this._description; set { {_description = value;} } } /// Internal Acessors for RequiredInput - string[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal.RequiredInput { get => this._requiredInput; set { {_requiredInput = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal.RequiredInput { get => this._requiredInput; set { {_requiredInput = value;} } } /// Internal Acessors for SolutionType - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataPropertiesInternal.SolutionType { get => this._solutionType; set { {_solutionType = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataPropertiesInternal.SolutionType { get => this._solutionType; set { {_solutionType = value;} } } /// Backing field for property. - private string[] _requiredInput; + private System.Collections.Generic.List _requiredInput; /// Required parameters for invoking this particular solution. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string[] RequiredInput { get => this._requiredInput; } + public System.Collections.Generic.List RequiredInput { get => this._requiredInput; } /// Backing field for property. private string _solutionId; @@ -44,11 +44,11 @@ public partial class SolutionMetadataProperties : public string SolutionId { get => this._solutionId; set => this._solutionId = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType? _solutionType; + private string _solutionType; /// Solution Type. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType? SolutionType { get => this._solutionType; } + public string SolutionType { get => this._solutionType; } /// Creates an new instance. public SolutionMetadataProperties() @@ -64,6 +64,9 @@ public partial interface ISolutionMetadataProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"A detailed description of solution.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -72,14 +75,20 @@ public partial interface ISolutionMetadataProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Required parameters for invoking this particular solution.", SerializedName = @"requiredInputs", PossibleTypes = new [] { typeof(string) })] - string[] RequiredInput { get; } + System.Collections.Generic.List RequiredInput { get; } /// Solution Id. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution Id.", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] @@ -88,10 +97,14 @@ public partial interface ISolutionMetadataProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Solution Type.", SerializedName = @"solutionType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType? SolutionType { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Diagnostics", "Solutions", "Troubleshooters", "SelfHelp")] + string SolutionType { get; } } /// Metadata Properties @@ -101,11 +114,12 @@ internal partial interface ISolutionMetadataPropertiesInternal /// A detailed description of solution. string Description { get; set; } /// Required parameters for invoking this particular solution. - string[] RequiredInput { get; set; } + System.Collections.Generic.List RequiredInput { get; set; } /// Solution Id. string SolutionId { get; set; } /// Solution Type. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType? SolutionType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Diagnostics", "Solutions", "Troubleshooters", "SelfHelp")] + string SolutionType { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataProperties.json.cs similarity index 90% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataProperties.json.cs index 7d437cff1d7a..51146652b332 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataProperties.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionMetadataProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionMetadataProperties(json) : null; } @@ -77,10 +77,10 @@ internal SolutionMetadataProperties(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp. { return; } - {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} - {_solutionType = If( json?.PropertyT("solutionType"), out var __jsonSolutionType) ? (string)__jsonSolutionType : (string)SolutionType;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_requiredInput = If( json?.PropertyT("requiredInputs"), out var __jsonRequiredInputs) ? If( __jsonRequiredInputs as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : RequiredInput;} + {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)_solutionId;} + {_solutionType = If( json?.PropertyT("solutionType"), out var __jsonSolutionType) ? (string)__jsonSolutionType : (string)_solutionType;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_requiredInput = If( json?.PropertyT("requiredInputs"), out var __jsonRequiredInputs) ? If( __jsonRequiredInputs as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _requiredInput;} AfterFromJson(json); } @@ -104,15 +104,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( return container; } AddIf( null != (((object)this._solutionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._solutionId.ToString()) : null, "solutionId" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._solutionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._solutionType.ToString()) : null, "solutionType" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { if (null != this._requiredInput) { diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataResource.PowerShell.cs similarity index 54% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataResource.PowerShell.cs index 6cd2b8c9e7e7..69f3b997b1d8 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SolutionMetadataResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionMetadataResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionMetadataResource(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,57 +111,57 @@ internal SolutionMetadataResource(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Solution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResourceInternal)this).Solution = (System.Collections.Generic.List) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -178,51 +176,51 @@ internal SolutionMetadataResource(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Solution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResourceInternal)this).Solution = (System.Collections.Generic.List) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataResource.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataResource.TypeConverter.cs index fe47c9f43e7d..44a7e78fdd5e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataResource.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataResource.cs new file mode 100644 index 000000000000..5d61ae3b2bda --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataResource.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Metadata resource + public partial class SolutionMetadataResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Solutions()); set { {_property = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions _property; + + /// Solution metadata Resource properties. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Solutions()); set => this._property = value; } + + /// List of metadata. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Solution { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsInternal)Property).Solution; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsInternal)Property).Solution = value ?? null /* arrayOf */; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public SolutionMetadataResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// Metadata resource + public partial interface ISolutionMetadataResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource + { + /// List of metadata. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"List of metadata.", + SerializedName = @"solutions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties) })] + System.Collections.Generic.List Solution { get; set; } + + } + /// Metadata resource + internal partial interface ISolutionMetadataResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResourceInternal + { + /// Solution metadata Resource properties. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions Property { get; set; } + /// List of metadata. + System.Collections.Generic.List Solution { get; set; } + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataResource.json.cs similarity index 91% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataResource.json.cs index ffd8aa69bc5d..a2f270a38cd5 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionMetadataResource.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionMetadataResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionMetadataResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionMetadataResource(json) : null; } @@ -77,8 +77,8 @@ internal SolutionMetadataResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Ru { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Solutions.FromJson(__jsonProperties) : Property;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Solutions.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionNlpMetadataResource.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionNlpMetadataResource.PowerShell.cs new file mode 100644 index 000000000000..e0d97581f014 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionNlpMetadataResource.PowerShell.cs @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Nlp Metadata resource + [System.ComponentModel.TypeConverter(typeof(SolutionNlpMetadataResourceTypeConverter))] + public partial class SolutionNlpMetadataResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SolutionNlpMetadataResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SolutionNlpMetadataResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SolutionNlpMetadataResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.NlpSolutionsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProblemTitle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ProblemTitle = (string) content.GetValueForProperty("ProblemTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ProblemTitle, global::System.Convert.ToString); + } + if (content.Contains("ProblemDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ProblemDescription = (string) content.GetValueForProperty("ProblemDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ProblemDescription, global::System.Convert.ToString); + } + if (content.Contains("ServiceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ServiceId, global::System.Convert.ToString); + } + if (content.Contains("ProblemClassificationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ProblemClassificationId = (string) content.GetValueForProperty("ProblemClassificationId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ProblemClassificationId, global::System.Convert.ToString); + } + if (content.Contains("Solution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).Solution = (System.Collections.Generic.List) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("RelatedService")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).RelatedService = (System.Collections.Generic.List) content.GetValueForProperty("RelatedService",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).RelatedService, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ClassificationServiceTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SolutionNlpMetadataResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.NlpSolutionsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProblemTitle")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ProblemTitle = (string) content.GetValueForProperty("ProblemTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ProblemTitle, global::System.Convert.ToString); + } + if (content.Contains("ProblemDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ProblemDescription = (string) content.GetValueForProperty("ProblemDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ProblemDescription, global::System.Convert.ToString); + } + if (content.Contains("ServiceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ServiceId = (string) content.GetValueForProperty("ServiceId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ServiceId, global::System.Convert.ToString); + } + if (content.Contains("ProblemClassificationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ProblemClassificationId = (string) content.GetValueForProperty("ProblemClassificationId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).ProblemClassificationId, global::System.Convert.ToString); + } + if (content.Contains("Solution")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).Solution = (System.Collections.Generic.List) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).Solution, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("RelatedService")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).RelatedService = (System.Collections.Generic.List) content.GetValueForProperty("RelatedService",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal)this).RelatedService, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ClassificationServiceTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Nlp Metadata resource + [System.ComponentModel.TypeConverter(typeof(SolutionNlpMetadataResourceTypeConverter))] + public partial interface ISolutionNlpMetadataResource + + { + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionNlpMetadataResource.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionNlpMetadataResource.TypeConverter.cs index f822569f67e9..328e5cb24b1e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionNlpMetadataResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionNlpMetadataResource.cs similarity index 51% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionNlpMetadataResource.cs index 5f1b5f4f35e9..0bbc241d2a76 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionNlpMetadataResource.cs @@ -3,112 +3,130 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Nlp Metadata resource public partial class SolutionNlpMetadataResource : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(); /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutions()); set { {_property = value;} } } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id = value ?? null; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name = value ?? null; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.NlpSolutions()); set { {_property = value;} } } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; } /// Problem Classification Id that is having the issue [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string ProblemClassificationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ProblemClassificationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ProblemClassificationId = value ?? null; } + public string ProblemClassificationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)Property).ProblemClassificationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)Property).ProblemClassificationId = value ?? null; } /// Description for given ProblemClassificationId [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string ProblemDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ProblemDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ProblemDescription = value ?? null; } + public string ProblemDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)Property).ProblemDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)Property).ProblemDescription = value ?? null; } /// Title for given ProblemClassificationId [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string ProblemTitle { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ProblemTitle; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ProblemTitle = value ?? null; } + public string ProblemTitle { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)Property).ProblemTitle; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)Property).ProblemTitle = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions _property; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions _property; /// Solution metadata Resource properties. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutions()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.NlpSolutions()); set => this._property = value; } /// The list of solution metadata. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[] RelatedService { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).RelatedService; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).RelatedService = value ?? null /* arrayOf */; } + public System.Collections.Generic.List RelatedService { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)Property).RelatedService; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)Property).RelatedService = value ?? null /* arrayOf */; } /// Service resource id that is having the problem [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string ServiceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ServiceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).ServiceId = value ?? null; } + public string ServiceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)Property).ServiceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)Property).ServiceId = value ?? null; } /// The list of solution metadata. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).Solution; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutionsInternal)Property).Solution = value ?? null /* arrayOf */; } + public System.Collections.Generic.List Solution { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)Property).Solution; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutionsInternal)Property).Solution = value ?? null /* arrayOf */; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemData; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType)""); } + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; } /// Creates an new instance. public SolutionNlpMetadataResource() @@ -124,19 +142,22 @@ public SolutionNlpMetadataResource() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); } } /// Nlp Metadata resource public partial interface ISolutionNlpMetadataResource : Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource { /// Problem Classification Id that is having the issue [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Problem Classification Id that is having the issue", SerializedName = @"problemClassificationId", PossibleTypes = new [] { typeof(string) })] @@ -145,6 +166,9 @@ public partial interface ISolutionNlpMetadataResource : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Description for given ProblemClassificationId", SerializedName = @"problemDescription", PossibleTypes = new [] { typeof(string) })] @@ -153,6 +177,9 @@ public partial interface ISolutionNlpMetadataResource : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Title for given ProblemClassificationId", SerializedName = @"problemTitle", PossibleTypes = new [] { typeof(string) })] @@ -161,14 +188,20 @@ public partial interface ISolutionNlpMetadataResource : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The list of solution metadata.", SerializedName = @"relatedServices", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[] RelatedService { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IClassificationService) })] + System.Collections.Generic.List RelatedService { get; set; } /// Service resource id that is having the problem [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Service resource id that is having the problem", SerializedName = @"serviceId", PossibleTypes = new [] { typeof(string) })] @@ -177,15 +210,18 @@ public partial interface ISolutionNlpMetadataResource : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The list of solution metadata.", SerializedName = @"solutions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties) })] + System.Collections.Generic.List Solution { get; set; } } /// Nlp Metadata resource internal partial interface ISolutionNlpMetadataResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResourceInternal { /// Problem Classification Id that is having the issue string ProblemClassificationId { get; set; } @@ -194,13 +230,13 @@ internal partial interface ISolutionNlpMetadataResourceInternal : /// Title for given ProblemClassificationId string ProblemTitle { get; set; } /// Solution metadata Resource properties. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.INlpSolutions Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.INlpSolutions Property { get; set; } /// The list of solution metadata. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IClassificationService[] RelatedService { get; set; } + System.Collections.Generic.List RelatedService { get; set; } /// Service resource id that is having the problem string ServiceId { get; set; } /// The list of solution metadata. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } + System.Collections.Generic.List Solution { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionNlpMetadataResource.json.cs similarity index 91% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionNlpMetadataResource.json.cs index 01f4b731ff87..cc79b7c2382e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionNlpMetadataResource.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionNlpMetadataResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionNlpMetadataResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionNlpMetadataResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionNlpMetadataResource(json) : null; } @@ -77,8 +77,8 @@ internal SolutionNlpMetadataResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.NlpSolutions.FromJson(__jsonProperties) : Property;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.NlpSolutions.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionPatchRequestBody.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionPatchRequestBody.PowerShell.cs new file mode 100644 index 000000000000..ce57e0dc82a7 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionPatchRequestBody.PowerShell.cs @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Solution PatchRequest body + [System.ComponentModel.TypeConverter(typeof(SolutionPatchRequestBodyTypeConverter))] + public partial class SolutionPatchRequestBody + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SolutionPatchRequestBody(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SolutionPatchRequestBody(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SolutionPatchRequestBody(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerCriterion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).TriggerCriterion = (System.Collections.Generic.List) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TriggerCriterionTypeConverter.ConvertFrom)); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("Section")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Section = (System.Collections.Generic.List) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Section, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SectionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapDiagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsDiagnosticTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapTroubleshooter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapMetricsBasedChart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.MetricsBasedChartTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SolutionPatchRequestBody(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerCriterion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).TriggerCriterion = (System.Collections.Generic.List) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TriggerCriterionTypeConverter.ConvertFrom)); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("Section")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Section = (System.Collections.Generic.List) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).Section, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SectionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapDiagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsDiagnosticTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapTroubleshooter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapMetricsBasedChart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.MetricsBasedChartTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Solution PatchRequest body + [System.ComponentModel.TypeConverter(typeof(SolutionPatchRequestBodyTypeConverter))] + public partial interface ISolutionPatchRequestBody + + { + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionPatchRequestBody.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionPatchRequestBody.TypeConverter.cs index 86797ea2c1a4..e6743c319755 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionPatchRequestBody.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionPatchRequestBody.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionPatchRequestBody.cs new file mode 100644 index 000000000000..97d1315c4e09 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionPatchRequestBody.cs @@ -0,0 +1,313 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Solution PatchRequest body + public partial class SolutionPatchRequestBody : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal + { + + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Content; } + + /// Internal Acessors for Content + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal.Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Content = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for ReplacementMap + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal.ReplacementMap { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMap; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMap = value ?? null /* model class */; } + + /// Internal Acessors for ReplacementMapDiagnostic + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal.ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapMetricsBasedChart + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal.ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapTroubleshooter + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal.ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapVideo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal.ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapVideoGroup + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal.ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapWebResult + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal.ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult = value ?? null /* arrayOf */; } + + /// Internal Acessors for Section + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal.Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Section; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Section = value ?? null /* arrayOf */; } + + /// Internal Acessors for SolutionId + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal.SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).SolutionId = value ?? null; } + + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBodyInternal.Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Title = value ?? null; } + + /// Client input parameters to run Solution + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Parameter = value ?? null /* model class */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties _property; + + /// Solution result + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourceProperties()); set => this._property = value; } + + /// Status of solution provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ProvisioningState; } + + /// Solution diagnostics results. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic; } + + /// Solution metrics based charts + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart; } + + /// Solutions Troubleshooters + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter; } + + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo; } + + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup; } + + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult; } + + /// List of section object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Section; } + + /// Solution Id to identify single solution. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).SolutionId; } + + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Title; } + + /// Solution request trigger criteria + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TriggerCriterion { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).TriggerCriterion; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).TriggerCriterion = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public SolutionPatchRequestBody() + { + + } + } + /// Solution PatchRequest body + public partial interface ISolutionPatchRequestBody : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable + { + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The HTML content that needs to be rendered and shown to customer.", + SerializedName = @"content", + PossibleTypes = new [] { typeof(string) })] + string Content { get; } + /// Client input parameters to run Solution + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Client input parameters to run Solution", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters Parameter { get; set; } + /// Status of solution provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Status of solution provisioning.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; } + /// Solution diagnostics results. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solution diagnostics results.", + SerializedName = @"diagnostics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic) })] + System.Collections.Generic.List ReplacementMapDiagnostic { get; } + /// Solution metrics based charts + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solution metrics based charts", + SerializedName = @"metricsBasedCharts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart) })] + System.Collections.Generic.List ReplacementMapMetricsBasedChart { get; } + /// Solutions Troubleshooters + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solutions Troubleshooters", + SerializedName = @"troubleshooters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters) })] + System.Collections.Generic.List ReplacementMapTroubleshooter { get; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", + SerializedName = @"videos", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo) })] + System.Collections.Generic.List ReplacementMapVideo { get; } + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Group of Videos", + SerializedName = @"videoGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup) })] + System.Collections.Generic.List ReplacementMapVideoGroup { get; } + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solution AzureKB results", + SerializedName = @"webResults", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult) })] + System.Collections.Generic.List ReplacementMapWebResult { get; } + /// List of section object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of section object.", + SerializedName = @"sections", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISection) })] + System.Collections.Generic.List Section { get; } + /// Solution Id to identify single solution. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solution Id to identify single solution.", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + string SolutionId { get; } + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The title.", + SerializedName = @"title", + PossibleTypes = new [] { typeof(string) })] + string Title { get; } + /// Solution request trigger criteria + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Solution request trigger criteria", + SerializedName = @"triggerCriteria", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion) })] + System.Collections.Generic.List TriggerCriterion { get; set; } + + } + /// Solution PatchRequest body + internal partial interface ISolutionPatchRequestBodyInternal + + { + /// The HTML content that needs to be rendered and shown to customer. + string Content { get; set; } + /// Client input parameters to run Solution + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters Parameter { get; set; } + /// Solution result + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties Property { get; set; } + /// Status of solution provisioning. + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; set; } + /// Solution replacement maps. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps ReplacementMap { get; set; } + /// Solution diagnostics results. + System.Collections.Generic.List ReplacementMapDiagnostic { get; set; } + /// Solution metrics based charts + System.Collections.Generic.List ReplacementMapMetricsBasedChart { get; set; } + /// Solutions Troubleshooters + System.Collections.Generic.List ReplacementMapTroubleshooter { get; set; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + System.Collections.Generic.List ReplacementMapVideo { get; set; } + /// Group of Videos + System.Collections.Generic.List ReplacementMapVideoGroup { get; set; } + /// Solution AzureKB results + System.Collections.Generic.List ReplacementMapWebResult { get; set; } + /// List of section object. + System.Collections.Generic.List Section { get; set; } + /// Solution Id to identify single solution. + string SolutionId { get; set; } + /// The title. + string Title { get; set; } + /// Solution request trigger criteria + System.Collections.Generic.List TriggerCriterion { get; set; } + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionPatchRequestBody.json.cs similarity index 93% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionPatchRequestBody.json.cs index 0ef60ee24088..65bc073578d8 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionPatchRequestBody.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionPatchRequestBody.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionPatchRequestBody partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionPatchRequestBody(json) : null; } @@ -77,7 +77,7 @@ internal SolutionPatchRequestBody(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Ru { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResource.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResource.PowerShell.cs new file mode 100644 index 000000000000..6882b18d7e17 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResource.PowerShell.cs @@ -0,0 +1,364 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Solution response. + [System.ComponentModel.TypeConverter(typeof(SolutionResourceTypeConverter))] + public partial class SolutionResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SolutionResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SolutionResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SolutionResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerCriterion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).TriggerCriterion = (System.Collections.Generic.List) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TriggerCriterionTypeConverter.ConvertFrom)); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("Section")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Section = (System.Collections.Generic.List) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Section, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SectionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapDiagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapDiagnostic = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsDiagnosticTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapTroubleshooter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapTroubleshooter = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapMetricsBasedChart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.MetricsBasedChartTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SolutionResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerCriterion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).TriggerCriterion = (System.Collections.Generic.List) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TriggerCriterionTypeConverter.ConvertFrom)); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("Section")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Section = (System.Collections.Generic.List) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Section, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SectionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapDiagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapDiagnostic = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsDiagnosticTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapTroubleshooter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapTroubleshooter = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapMetricsBasedChart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.MetricsBasedChartTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Solution response. + [System.ComponentModel.TypeConverter(typeof(SolutionResourceTypeConverter))] + public partial interface ISolutionResource + + { + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResource.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResource.TypeConverter.cs index 8cb36bbcae58..c0423b865f3e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResource.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResource.cs new file mode 100644 index 000000000000..30f7a9d5330b --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResource.cs @@ -0,0 +1,440 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Solution response. + public partial class SolutionResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(); + + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Content; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; } + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// Internal Acessors for Content + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal.Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Content = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for ReplacementMap + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal.ReplacementMap { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMap; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMap = value ?? null /* model class */; } + + /// Internal Acessors for ReplacementMapDiagnostic + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal.ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapMetricsBasedChart + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal.ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapTroubleshooter + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal.ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapVideo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal.ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapVideoGroup + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal.ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapWebResult + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal.ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult = value ?? null /* arrayOf */; } + + /// Internal Acessors for Section + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal.Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Section; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Section = value ?? null /* arrayOf */; } + + /// Internal Acessors for SolutionId + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal.SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).SolutionId = value ?? null; } + + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal.Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Title = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; } + + /// Client input parameters to run Solution + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Parameter = value ?? null /* model class */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties _property; + + /// Solution result + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourceProperties()); set => this._property = value; } + + /// Status of solution provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ProvisioningState; } + + /// Solution diagnostics results. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapDiagnostic; } + + /// Solution metrics based charts + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapMetricsBasedChart; } + + /// Solutions Troubleshooters + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapTroubleshooter; } + + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideo; } + + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapVideoGroup; } + + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).ReplacementMapWebResult; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// List of section object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Section; } + + /// Solution Id to identify single solution. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).SolutionId; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).Title; } + + /// Solution request trigger criteria + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TriggerCriterion { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).TriggerCriterion; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)Property).TriggerCriterion = value ?? null /* arrayOf */; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + } + + /// Creates an new instance. + public SolutionResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// Solution response. + public partial interface ISolutionResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource + { + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The HTML content that needs to be rendered and shown to customer.", + SerializedName = @"content", + PossibleTypes = new [] { typeof(string) })] + string Content { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Client input parameters to run Solution + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Client input parameters to run Solution", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters Parameter { get; set; } + /// Status of solution provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Status of solution provisioning.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; } + /// Solution diagnostics results. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solution diagnostics results.", + SerializedName = @"diagnostics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic) })] + System.Collections.Generic.List ReplacementMapDiagnostic { get; } + /// Solution metrics based charts + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solution metrics based charts", + SerializedName = @"metricsBasedCharts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart) })] + System.Collections.Generic.List ReplacementMapMetricsBasedChart { get; } + /// Solutions Troubleshooters + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solutions Troubleshooters", + SerializedName = @"troubleshooters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters) })] + System.Collections.Generic.List ReplacementMapTroubleshooter { get; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", + SerializedName = @"videos", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo) })] + System.Collections.Generic.List ReplacementMapVideo { get; } + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Group of Videos", + SerializedName = @"videoGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup) })] + System.Collections.Generic.List ReplacementMapVideoGroup { get; } + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solution AzureKB results", + SerializedName = @"webResults", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult) })] + System.Collections.Generic.List ReplacementMapWebResult { get; } + /// List of section object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of section object.", + SerializedName = @"sections", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISection) })] + System.Collections.Generic.List Section { get; } + /// Solution Id to identify single solution. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solution Id to identify single solution.", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + string SolutionId { get; } + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The title.", + SerializedName = @"title", + PossibleTypes = new [] { typeof(string) })] + string Title { get; } + /// Solution request trigger criteria + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Solution request trigger criteria", + SerializedName = @"triggerCriteria", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion) })] + System.Collections.Generic.List TriggerCriterion { get; set; } + + } + /// Solution response. + internal partial interface ISolutionResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResourceInternal + { + /// The HTML content that needs to be rendered and shown to customer. + string Content { get; set; } + + string Location { get; set; } + /// Client input parameters to run Solution + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters Parameter { get; set; } + /// Solution result + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties Property { get; set; } + /// Status of solution provisioning. + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; set; } + /// Solution replacement maps. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps ReplacementMap { get; set; } + /// Solution diagnostics results. + System.Collections.Generic.List ReplacementMapDiagnostic { get; set; } + /// Solution metrics based charts + System.Collections.Generic.List ReplacementMapMetricsBasedChart { get; set; } + /// Solutions Troubleshooters + System.Collections.Generic.List ReplacementMapTroubleshooter { get; set; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + System.Collections.Generic.List ReplacementMapVideo { get; set; } + /// Group of Videos + System.Collections.Generic.List ReplacementMapVideoGroup { get; set; } + /// Solution AzureKB results + System.Collections.Generic.List ReplacementMapWebResult { get; set; } + /// List of section object. + System.Collections.Generic.List Section { get; set; } + /// Solution Id to identify single solution. + string SolutionId { get; set; } + /// The title. + string Title { get; set; } + /// Solution request trigger criteria + System.Collections.Generic.List TriggerCriterion { get; set; } + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResource.json.cs similarity index 91% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResource.json.cs index 8590f7857dab..95b82ab358cf 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResource.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionResource(json) : null; } @@ -77,8 +77,8 @@ internal SolutionResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Js { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceProperties.FromJson(__jsonProperties) : Property;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceProperties.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceProperties.PowerShell.cs new file mode 100644 index 000000000000..28f378adf5ed --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceProperties.PowerShell.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Solution result + [System.ComponentModel.TypeConverter(typeof(SolutionResourcePropertiesTypeConverter))] + public partial class SolutionResourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SolutionResourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SolutionResourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SolutionResourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerCriterion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).TriggerCriterion = (System.Collections.Generic.List) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TriggerCriterionTypeConverter.ConvertFrom)); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("Section")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Section = (System.Collections.Generic.List) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Section, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SectionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapDiagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsDiagnosticTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapTroubleshooter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapMetricsBasedChart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.MetricsBasedChartTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SolutionResourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerCriterion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).TriggerCriterion = (System.Collections.Generic.List) content.GetValueForProperty("TriggerCriterion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).TriggerCriterion, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TriggerCriterionTypeConverter.ConvertFrom)); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("Section")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Section = (System.Collections.Generic.List) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).Section, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SectionTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapDiagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapDiagnostic, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsDiagnosticTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapTroubleshooter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapTroubleshooter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapTroubleshooter, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsTroubleshootersTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapMetricsBasedChart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapMetricsBasedChart",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal)this).ReplacementMapMetricsBasedChart, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.MetricsBasedChartTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Solution result + [System.ComponentModel.TypeConverter(typeof(SolutionResourcePropertiesTypeConverter))] + public partial interface ISolutionResourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceProperties.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceProperties.TypeConverter.cs index d7b43fca1b1d..bafe3e74d03f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceProperties.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceProperties.cs new file mode 100644 index 000000000000..daa1004e152f --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceProperties.cs @@ -0,0 +1,329 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Solution result + public partial class SolutionResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal + { + + /// Backing field for property. + private string _content; + + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string Content { get => this._content; } + + /// Internal Acessors for Content + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal.Content { get => this._content; set { {_content = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ReplacementMap + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMaps()); set { {_replacementMap = value;} } } + + /// Internal Acessors for ReplacementMapDiagnostic + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal.ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Diagnostic = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapMetricsBasedChart + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal.ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapTroubleshooter + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal.ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Troubleshooter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Troubleshooter = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapVideo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal.ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapVideoGroup + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal.ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapWebResult + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal.ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } + + /// Internal Acessors for Section + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal.Section { get => this._section; set { {_section = value;} } } + + /// Internal Acessors for SolutionId + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal.SolutionId { get => this._solutionId; set { {_solutionId = value;} } } + + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesInternal.Title { get => this._title; set { {_title = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters _parameter; + + /// Client input parameters to run Solution + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesParameters()); set => this._parameter = value; } + + /// Backing field for property. + private string _provisioningState; + + /// Status of solution provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps _replacementMap; + + /// Solution replacement maps. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMaps()); } + + /// Solution diagnostics results. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapDiagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Diagnostic; } + + /// Solution metrics based charts + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapMetricsBasedChart { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).MetricsBasedChart; } + + /// Solutions Troubleshooters + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapTroubleshooter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Troubleshooter; } + + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).Video; } + + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).VideoGroup; } + + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsInternal)ReplacementMap).WebResult; } + + /// Backing field for property. + private System.Collections.Generic.List _section; + + /// List of section object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public System.Collections.Generic.List Section { get => this._section; } + + /// Backing field for property. + private string _solutionId; + + /// Solution Id to identify single solution. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string SolutionId { get => this._solutionId; } + + /// Backing field for property. + private string _title; + + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string Title { get => this._title; } + + /// Backing field for property. + private System.Collections.Generic.List _triggerCriterion; + + /// Solution request trigger criteria + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public System.Collections.Generic.List TriggerCriterion { get => this._triggerCriterion; set => this._triggerCriterion = value; } + + /// Creates an new instance. + public SolutionResourceProperties() + { + + } + } + /// Solution result + public partial interface ISolutionResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable + { + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The HTML content that needs to be rendered and shown to customer.", + SerializedName = @"content", + PossibleTypes = new [] { typeof(string) })] + string Content { get; } + /// Client input parameters to run Solution + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Client input parameters to run Solution", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters Parameter { get; set; } + /// Status of solution provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Status of solution provisioning.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; } + /// Solution diagnostics results. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solution diagnostics results.", + SerializedName = @"diagnostics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic) })] + System.Collections.Generic.List ReplacementMapDiagnostic { get; } + /// Solution metrics based charts + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solution metrics based charts", + SerializedName = @"metricsBasedCharts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IMetricsBasedChart) })] + System.Collections.Generic.List ReplacementMapMetricsBasedChart { get; } + /// Solutions Troubleshooters + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solutions Troubleshooters", + SerializedName = @"troubleshooters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters) })] + System.Collections.Generic.List ReplacementMapTroubleshooter { get; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", + SerializedName = @"videos", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo) })] + System.Collections.Generic.List ReplacementMapVideo { get; } + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Group of Videos", + SerializedName = @"videoGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup) })] + System.Collections.Generic.List ReplacementMapVideoGroup { get; } + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solution AzureKB results", + SerializedName = @"webResults", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult) })] + System.Collections.Generic.List ReplacementMapWebResult { get; } + /// List of section object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of section object.", + SerializedName = @"sections", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISection) })] + System.Collections.Generic.List Section { get; } + /// Solution Id to identify single solution. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solution Id to identify single solution.", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + string SolutionId { get; } + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The title.", + SerializedName = @"title", + PossibleTypes = new [] { typeof(string) })] + string Title { get; } + /// Solution request trigger criteria + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Solution request trigger criteria", + SerializedName = @"triggerCriteria", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion) })] + System.Collections.Generic.List TriggerCriterion { get; set; } + + } + /// Solution result + internal partial interface ISolutionResourcePropertiesInternal + + { + /// The HTML content that needs to be rendered and shown to customer. + string Content { get; set; } + /// Client input parameters to run Solution + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters Parameter { get; set; } + /// Status of solution provisioning. + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "PartialComplete", "Failed", "Running", "Canceled")] + string ProvisioningState { get; set; } + /// Solution replacement maps. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMaps ReplacementMap { get; set; } + /// Solution diagnostics results. + System.Collections.Generic.List ReplacementMapDiagnostic { get; set; } + /// Solution metrics based charts + System.Collections.Generic.List ReplacementMapMetricsBasedChart { get; set; } + /// Solutions Troubleshooters + System.Collections.Generic.List ReplacementMapTroubleshooter { get; set; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + System.Collections.Generic.List ReplacementMapVideo { get; set; } + /// Group of Videos + System.Collections.Generic.List ReplacementMapVideoGroup { get; set; } + /// Solution AzureKB results + System.Collections.Generic.List ReplacementMapWebResult { get; set; } + /// List of section object. + System.Collections.Generic.List Section { get; set; } + /// Solution Id to identify single solution. + string SolutionId { get; set; } + /// The title. + string Title { get; set; } + /// Solution request trigger criteria + System.Collections.Generic.List TriggerCriterion { get; set; } + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceProperties.json.cs similarity index 83% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceProperties.json.cs index 2a144012ac22..75f361f22122 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceProperties.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionResourceProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionResourceProperties(json) : null; } @@ -77,14 +77,14 @@ internal SolutionResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp. { return; } - {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMaps.FromJson(__jsonReplacementMaps) : ReplacementMap;} - {_triggerCriterion = If( json?.PropertyT("triggerCriteria"), out var __jsonTriggerCriteria) ? If( __jsonTriggerCriteria as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TriggerCriterion.FromJson(__u) )) ))() : null : TriggerCriterion;} - {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParameters.FromJson(__jsonParameters) : Parameter;} - {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} - {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)Content;} - {_section = If( json?.PropertyT("sections"), out var __jsonSections) ? If( __jsonSections as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISection) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Section.FromJson(__p) )) ))() : null : Section;} + {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMaps.FromJson(__jsonReplacementMaps) : _replacementMap;} + {_triggerCriterion = If( json?.PropertyT("triggerCriteria"), out var __jsonTriggerCriteria) ? If( __jsonTriggerCriteria as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TriggerCriterion.FromJson(__u) )) ))() : null : _triggerCriterion;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesParameters.FromJson(__jsonParameters) : _parameter;} + {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)_solutionId;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)_title;} + {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)_content;} + {_section = If( json?.PropertyT("sections"), out var __jsonSections) ? If( __jsonSections as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISection) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Section.FromJson(__p) )) ))() : null : _section;} AfterFromJson(json); } @@ -107,7 +107,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._replacementMap ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._replacementMap.ToJson(null,serializationMode) : null, "replacementMaps" ,container.Add ); } @@ -121,23 +121,23 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( container.Add("triggerCriteria",__w); } AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._solutionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._solutionId.ToString()) : null, "solutionId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._title)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._title.ToString()) : null, "title" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._content)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._content.ToString()) : null, "content" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { if (null != this._section) { diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.PowerShell.cs similarity index 87% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.PowerShell.cs index 0d2214be0dd0..bd0aec703caf 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SolutionResourcePropertiesParameters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionResourcePropertiesParameters(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionResourcePropertiesParameters(content); } @@ -97,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -119,7 +117,7 @@ internal SolutionResourcePropertiesParameters(global::System.Collections.IDictio } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.TypeConverter.cs index 597707b1bc08..2cf6070a2c64 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.cs similarity index 78% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.cs index 27cd4c60d2a3..e50484f8c6bc 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Client input parameters to run Solution public partial class SolutionResourcePropertiesParameters : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParametersInternal { /// Creates an new instance. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.dictionary.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.dictionary.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.dictionary.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.dictionary.cs index 95101a730a01..40f41ffa94e7 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.dictionary.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourcePropertiesParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourcePropertiesParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.json.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.json.cs index c97f7d028eb7..1eeaeee13592 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourcePropertiesParameters.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourcePropertiesParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionResourcePropertiesParameters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionResourcePropertiesParameters(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceSelfHelp.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceSelfHelp.PowerShell.cs new file mode 100644 index 000000000000..20888cf8d3d4 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceSelfHelp.PowerShell.cs @@ -0,0 +1,308 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Self Help Solution response. + [System.ComponentModel.TypeConverter(typeof(SolutionResourceSelfHelpTypeConverter))] + public partial class SolutionResourceSelfHelp + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SolutionResourceSelfHelp(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SolutionResourceSelfHelp(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SolutionResourceSelfHelp(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsResourcePropertiesSelfHelpTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("Section")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Section = (System.Collections.Generic.List) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Section, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SectionSelfHelpTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SolutionResourceSelfHelp(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsResourcePropertiesSelfHelpTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ReplacementMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); + } + if (content.Contains("SolutionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).SolutionId, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Content")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Content, global::System.Convert.ToString); + } + if (content.Contains("Section")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Section = (System.Collections.Generic.List) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).Section, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SectionSelfHelpTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapWebResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); + } + if (content.Contains("ReplacementMapVideoGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Self Help Solution response. + [System.ComponentModel.TypeConverter(typeof(SolutionResourceSelfHelpTypeConverter))] + public partial interface ISolutionResourceSelfHelp + + { + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceSelfHelp.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceSelfHelp.TypeConverter.cs index b0d13bf8407e..20cb28aa5804 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceSelfHelp.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceSelfHelp.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceSelfHelp.cs new file mode 100644 index 000000000000..eac3ce626a58 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceSelfHelp.cs @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Self Help Solution response. + public partial class SolutionResourceSelfHelp : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(); + + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).Content; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// Internal Acessors for Content + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal.Content { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).Content; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).Content = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsResourcePropertiesSelfHelp()); set { {_property = value;} } } + + /// Internal Acessors for ReplacementMap + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal.ReplacementMap { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMap; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMap = value ?? null /* model class */; } + + /// Internal Acessors for ReplacementMapVideo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal.ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideo = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapVideoGroup + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal.ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideoGroup = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapWebResult + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal.ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapWebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapWebResult = value ?? null /* arrayOf */; } + + /// Internal Acessors for Section + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal.Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).Section; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).Section = value ?? null /* arrayOf */; } + + /// Internal Acessors for SolutionId + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal.SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).SolutionId = value ?? null; } + + /// Internal Acessors for Title + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelpInternal.Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).Title = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp _property; + + /// Solution result + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsResourcePropertiesSelfHelp()); set => this._property = value; } + + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideo; } + + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapVideoGroup; } + + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).ReplacementMapWebResult; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// List of section object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Section { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).Section; } + + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).SolutionId; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)Property).Title; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public SolutionResourceSelfHelp() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// Self Help Solution response. + public partial interface ISolutionResourceSelfHelp : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource + { + /// The HTML content that needs to be rendered and shown to customer. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The HTML content that needs to be rendered and shown to customer.", + SerializedName = @"content", + PossibleTypes = new [] { typeof(string) })] + string Content { get; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", + SerializedName = @"videos", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo) })] + System.Collections.Generic.List ReplacementMapVideo { get; } + /// Group of Videos + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Group of Videos", + SerializedName = @"videoGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup) })] + System.Collections.Generic.List ReplacementMapVideoGroup { get; } + /// Solution AzureKB results + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Solution AzureKB results", + SerializedName = @"webResults", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult) })] + System.Collections.Generic.List ReplacementMapWebResult { get; } + /// List of section object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of section object.", + SerializedName = @"sections", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelp) })] + System.Collections.Generic.List Section { get; } + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + string SolutionId { get; } + /// The title. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The title.", + SerializedName = @"title", + PossibleTypes = new [] { typeof(string) })] + string Title { get; } + + } + /// Self Help Solution response. + internal partial interface ISolutionResourceSelfHelpInternal : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResourceInternal + { + /// The HTML content that needs to be rendered and shown to customer. + string Content { get; set; } + /// Solution result + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp Property { get; set; } + /// Solution replacement maps. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp ReplacementMap { get; set; } + /// + /// Video solutions, which have the power to engage the customer by stimulating their senses + /// + System.Collections.Generic.List ReplacementMapVideo { get; set; } + /// Group of Videos + System.Collections.Generic.List ReplacementMapVideoGroup { get; set; } + /// Solution AzureKB results + System.Collections.Generic.List ReplacementMapWebResult { get; set; } + /// List of section object. + System.Collections.Generic.List Section { get; set; } + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + string SolutionId { get; set; } + /// The title. + string Title { get; set; } + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceSelfHelp.json.cs similarity index 91% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceSelfHelp.json.cs index 332ec8295fdb..6c9958d30d21 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionResourceSelfHelp.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionResourceSelfHelp.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionResourceSelfHelp partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionResourceSelfHelp(json) : null; } @@ -77,8 +77,8 @@ internal SolutionResourceSelfHelp(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Ru { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionsResourcePropertiesSelfHelp.FromJson(__jsonProperties) : Property;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionsResourcePropertiesSelfHelp.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBody.PowerShell.cs similarity index 79% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBody.PowerShell.cs index 6b49367ead43..ce60dd8dbd18 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBody.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SolutionWarmUpRequestBody partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionWarmUpRequestBody(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionWarmUpRequestBody(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,13 +111,13 @@ internal SolutionWarmUpRequestBody(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBodyParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionWarmUpRequestBodyParametersTypeConverter.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. @@ -134,7 +132,7 @@ internal SolutionWarmUpRequestBody(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBodyParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionWarmUpRequestBodyParametersTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBody.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBody.TypeConverter.cs index aed92ea4b41c..13bd0b7d0a73 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBody.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBody.cs similarity index 63% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBody.cs index 37be4040e752..b3b7d110c205 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBody.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Solution WarmUpRequest body public partial class SolutionWarmUpRequestBody : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters _parameter; /// Dictionary of [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBodyParameters()); set => this._parameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionWarmUpRequestBodyParameters()); set => this._parameter = value; } /// Creates an new instance. public SolutionWarmUpRequestBody() @@ -34,10 +34,13 @@ public partial interface ISolutionWarmUpRequestBody : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Dictionary of ", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters Parameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters Parameter { get; set; } } /// Solution WarmUpRequest body @@ -45,7 +48,7 @@ internal partial interface ISolutionWarmUpRequestBodyInternal { /// Dictionary of - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters Parameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters Parameter { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBody.json.cs similarity index 93% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBody.json.cs index a1a377d2712c..7867b23186da 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBody.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBody.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionWarmUpRequestBody partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionWarmUpRequestBody(json) : null; } @@ -77,7 +77,7 @@ internal SolutionWarmUpRequestBody(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.R { return; } - {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBodyParameters.FromJson(__jsonParameters) : Parameter;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionWarmUpRequestBodyParameters.FromJson(__jsonParameters) : _parameter;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.PowerShell.cs similarity index 87% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.PowerShell.cs index 88bd295a2359..d5b0cef437ff 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SolutionWarmUpRequestBodyParameters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionWarmUpRequestBodyParameters(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionWarmUpRequestBodyParameters(content); } @@ -97,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -119,7 +117,7 @@ internal SolutionWarmUpRequestBodyParameters(global::System.Collections.IDiction } /// - /// 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/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.TypeConverter.cs index b8db0576f90c..f41d6ac1f233 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.cs similarity index 77% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.cs index 14e8fb322725..6a4c50096f70 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Dictionary of public partial class SolutionWarmUpRequestBodyParameters : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParametersInternal { /// Creates an new instance. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.dictionary.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.dictionary.cs similarity index 95% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.dictionary.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.dictionary.cs index 0377f32151f3..81e926304349 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.dictionary.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBodyParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionWarmUpRequestBodyParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.json.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.json.cs index dfbbbd6df7fe..61caa585edfd 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionWarmUpRequestBodyParameters.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionWarmUpRequestBodyParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionWarmUpRequestBodyParameters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionWarmUpRequestBodyParameters(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Solutions.PowerShell.cs similarity index 79% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Solutions.PowerShell.cs index 7549df62c097..b963a27f633b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Solutions.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Solutions partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Solutions(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Solutions(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,13 +111,13 @@ internal Solutions(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Solution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsInternal)this).Solution = (System.Collections.Generic.List) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -132,7 +132,7 @@ internal Solutions(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Solution")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal)this).Solution = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[]) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsInternal)this).Solution = (System.Collections.Generic.List) content.GetValueForProperty("Solution",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsInternal)this).Solution, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataPropertiesTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Solutions.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Solutions.TypeConverter.cs index be1b7b9cdb7c..5e201d0d7750 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Solutions.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Solutions.cs similarity index 60% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Solutions.cs index d2d76c20cb76..d164190374e1 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Solutions.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// List of solutions public partial class Solutions : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] _solution; + private System.Collections.Generic.List _solution; /// List of metadata. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get => this._solution; set => this._solution = value; } + public System.Collections.Generic.List Solution { get => this._solution; set => this._solution = value; } /// Creates an new instance. public Solutions() @@ -34,10 +34,13 @@ public partial interface ISolutions : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of metadata.", SerializedName = @"solutions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties) })] + System.Collections.Generic.List Solution { get; set; } } /// List of solutions @@ -45,7 +48,7 @@ internal partial interface ISolutionsInternal { /// List of metadata. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties[] Solution { get; set; } + System.Collections.Generic.List Solution { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Solutions.json.cs similarity index 88% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Solutions.json.cs index 67bc0cd219e3..eed91edfc463 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Solutions.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Solutions.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Solutions partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutions FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutions FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Solutions(json) : null; } @@ -77,7 +75,7 @@ internal Solutions(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Json { return; } - {_solution = If( json?.PropertyT("solutions"), out var __jsonSolutions) ? If( __jsonSolutions as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataProperties) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionMetadataProperties.FromJson(__u) )) ))() : null : Solution;} + {_solution = If( json?.PropertyT("solutions"), out var __jsonSolutions) ? If( __jsonSolutions as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataProperties) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionMetadataProperties.FromJson(__u) )) ))() : null : _solution;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsDiagnostic.PowerShell.cs similarity index 62% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsDiagnostic.PowerShell.cs index 15c90408bc7e..b57f679c0a2d 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsDiagnostic.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SolutionsDiagnostic partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionsDiagnostic(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionsDiagnostic(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,37 +111,37 @@ internal SolutionsDiagnostic(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("StatusDetail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).StatusDetail = (string) content.GetValueForProperty("StatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).StatusDetail, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).StatusDetail = (string) content.GetValueForProperty("StatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).StatusDetail, global::System.Convert.ToString); } if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("EstimatedCompletionTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).EstimatedCompletionTime = (string) content.GetValueForProperty("EstimatedCompletionTime",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).EstimatedCompletionTime, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).EstimatedCompletionTime = (string) content.GetValueForProperty("EstimatedCompletionTime",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).EstimatedCompletionTime, global::System.Convert.ToString); } if (content.Contains("RequiredParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).RequiredParameter = (string[]) content.GetValueForProperty("RequiredParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).RequiredParameter, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).RequiredParameter = (System.Collections.Generic.List) content.GetValueForProperty("RequiredParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).RequiredParameter, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.InsightTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).Insight = (System.Collections.Generic.List) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.InsightTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -158,31 +156,31 @@ internal SolutionsDiagnostic(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("StatusDetail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).StatusDetail = (string) content.GetValueForProperty("StatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).StatusDetail, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).StatusDetail = (string) content.GetValueForProperty("StatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).StatusDetail, global::System.Convert.ToString); } if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("EstimatedCompletionTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).EstimatedCompletionTime = (string) content.GetValueForProperty("EstimatedCompletionTime",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).EstimatedCompletionTime, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).EstimatedCompletionTime = (string) content.GetValueForProperty("EstimatedCompletionTime",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).EstimatedCompletionTime, global::System.Convert.ToString); } if (content.Contains("RequiredParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).RequiredParameter = (string[]) content.GetValueForProperty("RequiredParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).RequiredParameter, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).RequiredParameter = (System.Collections.Generic.List) content.GetValueForProperty("RequiredParameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).RequiredParameter, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } if (content.Contains("Insight")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Insight = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[]) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.InsightTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).Insight = (System.Collections.Generic.List) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal)this).Insight, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.InsightTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsDiagnostic.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsDiagnostic.TypeConverter.cs index f0a9a56d349b..24d832cf3327 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsDiagnostic.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsDiagnostic.cs similarity index 75% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsDiagnostic.cs index ed1a727505ba..29fa919ea931 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsDiagnostic.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Solutions Diagnostic public partial class SolutionsDiagnostic : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnosticInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnosticInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class SolutionsDiagnostic : public string EstimatedCompletionTime { get => this._estimatedCompletionTime; set => this._estimatedCompletionTime = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] _insight; + private System.Collections.Generic.List _insight; /// Diagnostic insights [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get => this._insight; set => this._insight = value; } + public System.Collections.Generic.List Insight { get => this._insight; set => this._insight = value; } /// Backing field for property. private string _replacementKey; @@ -35,11 +35,11 @@ public partial class SolutionsDiagnostic : public string ReplacementKey { get => this._replacementKey; set => this._replacementKey = value; } /// Backing field for property. - private string[] _requiredParameter; + private System.Collections.Generic.List _requiredParameter; /// Required parameters of this item [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public string[] RequiredParameter { get => this._requiredParameter; set => this._requiredParameter = value; } + public System.Collections.Generic.List RequiredParameter { get => this._requiredParameter; set => this._requiredParameter = value; } /// Backing field for property. private string _solutionId; @@ -49,11 +49,11 @@ public partial class SolutionsDiagnostic : public string SolutionId { get => this._solutionId; set => this._solutionId = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status? _status; + private string _status; /// Denotes the status of the diagnostic resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status? Status { get => this._status; set => this._status = value; } + public string Status { get => this._status; set => this._status = value; } /// Backing field for property. private string _statusDetail; @@ -76,6 +76,9 @@ public partial interface ISolutionsDiagnostic : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Diagnostics estimated completion time in minutes", SerializedName = @"estimatedCompletionTime", PossibleTypes = new [] { typeof(string) })] @@ -84,14 +87,20 @@ public partial interface ISolutionsDiagnostic : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Diagnostic insights", SerializedName = @"insights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight) })] + System.Collections.Generic.List Insight { get; set; } /// Place holder used in HTML Content replace control with the content [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Place holder used in HTML Content replace control with the content", SerializedName = @"replacementKey", PossibleTypes = new [] { typeof(string) })] @@ -100,14 +109,20 @@ public partial interface ISolutionsDiagnostic : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Required parameters of this item", SerializedName = @"requiredParameters", PossibleTypes = new [] { typeof(string) })] - string[] RequiredParameter { get; set; } + System.Collections.Generic.List RequiredParameter { get; set; } /// Solution Id to identify single Solutions Diagnostic [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution Id to identify single Solutions Diagnostic", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] @@ -116,14 +131,21 @@ public partial interface ISolutionsDiagnostic : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Denotes the status of the diagnostic resource.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status? Status { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Failed", "MissingInputs", "Running", "Succeeded", "Timeout")] + string Status { get; set; } /// Details of the status [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Details of the status", SerializedName = @"statusDetails", PossibleTypes = new [] { typeof(string) })] @@ -137,15 +159,16 @@ internal partial interface ISolutionsDiagnosticInternal /// Diagnostics estimated completion time in minutes string EstimatedCompletionTime { get; set; } /// Diagnostic insights - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get; set; } + System.Collections.Generic.List Insight { get; set; } /// Place holder used in HTML Content replace control with the content string ReplacementKey { get; set; } /// Required parameters of this item - string[] RequiredParameter { get; set; } + System.Collections.Generic.List RequiredParameter { get; set; } /// Solution Id to identify single Solutions Diagnostic string SolutionId { get; set; } /// Denotes the status of the diagnostic resource. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Failed", "MissingInputs", "Running", "Succeeded", "Timeout")] + string Status { get; set; } /// Details of the status string StatusDetail { get; set; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsDiagnostic.json.cs similarity index 88% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsDiagnostic.json.cs index a454d260643e..a38ae1baa14c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsDiagnostic.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsDiagnostic.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionsDiagnostic partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsDiagnostic FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsDiagnostic FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionsDiagnostic(json) : null; } @@ -77,13 +77,13 @@ internal SolutionsDiagnostic(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime { return; } - {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_statusDetail = If( json?.PropertyT("statusDetails"), out var __jsonStatusDetails) ? (string)__jsonStatusDetails : (string)StatusDetail;} - {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)ReplacementKey;} - {_estimatedCompletionTime = If( json?.PropertyT("estimatedCompletionTime"), out var __jsonEstimatedCompletionTime) ? (string)__jsonEstimatedCompletionTime : (string)EstimatedCompletionTime;} - {_requiredParameter = If( json?.PropertyT("requiredParameters"), out var __jsonRequiredParameters) ? If( __jsonRequiredParameters as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : RequiredParameter;} - {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Insight.FromJson(__p) )) ))() : null : Insight;} + {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)_solutionId;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_statusDetail = If( json?.PropertyT("statusDetails"), out var __jsonStatusDetails) ? (string)__jsonStatusDetails : (string)_statusDetail;} + {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)_replacementKey;} + {_estimatedCompletionTime = If( json?.PropertyT("estimatedCompletionTime"), out var __jsonEstimatedCompletionTime) ? (string)__jsonEstimatedCompletionTime : (string)_estimatedCompletionTime;} + {_requiredParameter = If( json?.PropertyT("requiredParameters"), out var __jsonRequiredParameters) ? If( __jsonRequiredParameters as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _requiredParameter;} + {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Insight.FromJson(__p) )) ))() : null : _insight;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsResourcePropertiesSelfHelp.PowerShell.cs similarity index 53% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsResourcePropertiesSelfHelp.PowerShell.cs index 52964365a84a..583bc7b9eeb2 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsResourcePropertiesSelfHelp.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SolutionsResourcePropertiesSelfHelp partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionsResourcePropertiesSelfHelp(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionsResourcePropertiesSelfHelp(content); } @@ -97,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -115,41 +113,41 @@ internal SolutionsResourcePropertiesSelfHelp(global::System.Collections.IDiction // actually deserialize if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("Section")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelpTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).Section = (System.Collections.Generic.List) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).Section, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SectionSelfHelpTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -164,35 +162,35 @@ internal SolutionsResourcePropertiesSelfHelp(global::System.Management.Automatio // actually deserialize if (content.Contains("ReplacementMap")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMap = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp) content.GetValueForProperty("ReplacementMap",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMap, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsSelfHelpTypeConverter.ConvertFrom); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Content")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Content, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).Content = (string) content.GetValueForProperty("Content",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).Content, global::System.Convert.ToString); } if (content.Contains("Section")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Section = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[]) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).Section, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelpTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).Section = (System.Collections.Generic.List) content.GetValueForProperty("Section",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).Section, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SectionSelfHelpTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapWebResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapWebResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[]) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.WebResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapWebResult = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapWebResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapWebResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.WebResultTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideo")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideo = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[]) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideo = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementMapVideoGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideoGroup = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[]) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideoGroup = (System.Collections.Generic.List) content.GetValueForProperty("ReplacementMapVideoGroup",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal)this).ReplacementMapVideoGroup, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsResourcePropertiesSelfHelp.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsResourcePropertiesSelfHelp.TypeConverter.cs index ca458120b834..8daded0fb9cb 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsResourcePropertiesSelfHelp.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsResourcePropertiesSelfHelp.cs similarity index 56% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsResourcePropertiesSelfHelp.cs index 6f60ef5bc503..aa68cc335593 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsResourcePropertiesSelfHelp.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Solution result public partial class SolutionsResourcePropertiesSelfHelp : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal { /// Backing field for property. @@ -21,47 +21,56 @@ public partial class SolutionsResourcePropertiesSelfHelp : public string Content { get => this._content; } /// Internal Acessors for Content - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal.Content { get => this._content; set { {_content = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal.Content { get => this._content; set { {_content = value;} } } /// Internal Acessors for ReplacementMap - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelp()); set { {_replacementMap = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal.ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsSelfHelp()); set { {_replacementMap = value;} } } + + /// Internal Acessors for ReplacementMapVideo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal.ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapVideoGroup + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal.ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } + + /// Internal Acessors for ReplacementMapWebResult + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal.ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } /// Internal Acessors for Section - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal.Section { get => this._section; set { {_section = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal.Section { get => this._section; set { {_section = value;} } } /// Internal Acessors for SolutionId - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal.SolutionId { get => this._solutionId; set { {_solutionId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal.SolutionId { get => this._solutionId; set { {_solutionId = value;} } } /// Internal Acessors for Title - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelpInternal.Title { get => this._title; set { {_title = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelpInternal.Title { get => this._title; set { {_title = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp _replacementMap; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp _replacementMap; /// Solution replacement maps. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelp()); } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp ReplacementMap { get => (this._replacementMap = this._replacementMap ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsSelfHelp()); } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).Video; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).Video = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ReplacementMapVideo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).Video; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).VideoGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).VideoGroup = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ReplacementMapVideoGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).VideoGroup; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).WebResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelpInternal)ReplacementMap).WebResult = value ?? null /* arrayOf */; } + public System.Collections.Generic.List ReplacementMapWebResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelpInternal)ReplacementMap).WebResult; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] _section; + private System.Collections.Generic.List _section; /// List of section object. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Section { get => this._section; } + public System.Collections.Generic.List Section { get => this._section; } /// Backing field for property. private string _solutionId; @@ -93,6 +102,9 @@ public partial interface ISolutionsResourcePropertiesSelfHelp : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The HTML content that needs to be rendered and shown to customer.", SerializedName = @"content", PossibleTypes = new [] { typeof(string) })] @@ -102,41 +114,56 @@ public partial interface ISolutionsResourcePropertiesSelfHelp : /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Video solutions, which have the power to engage the customer by stimulating their senses", SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo) })] + System.Collections.Generic.List ReplacementMapVideo { get; } /// Group of Videos [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Group of Videos", SerializedName = @"videoGroups", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup) })] + System.Collections.Generic.List ReplacementMapVideoGroup { get; } /// Solution AzureKB results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Solution AzureKB results", SerializedName = @"webResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult) })] + System.Collections.Generic.List ReplacementMapWebResult { get; } /// List of section object. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of section object.", SerializedName = @"sections", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Section { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelp) })] + System.Collections.Generic.List Section { get; } /// /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] @@ -145,6 +172,9 @@ public partial interface ISolutionsResourcePropertiesSelfHelp : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The title.", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] @@ -158,17 +188,17 @@ internal partial interface ISolutionsResourcePropertiesSelfHelpInternal /// The HTML content that needs to be rendered and shown to customer. string Content { get; set; } /// Solution replacement maps. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IReplacementMapsSelfHelp ReplacementMap { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IReplacementMapsSelfHelp ReplacementMap { get; set; } /// /// Video solutions, which have the power to engage the customer by stimulating their senses /// - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo[] ReplacementMapVideo { get; set; } + System.Collections.Generic.List ReplacementMapVideo { get; set; } /// Group of Videos - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup[] ReplacementMapVideoGroup { get; set; } + System.Collections.Generic.List ReplacementMapVideoGroup { get; set; } /// Solution AzureKB results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult[] ReplacementMapWebResult { get; set; } + System.Collections.Generic.List ReplacementMapWebResult { get; set; } /// List of section object. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp[] Section { get; set; } + System.Collections.Generic.List Section { get; set; } /// /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP /// diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsResourcePropertiesSelfHelp.json.cs similarity index 86% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsResourcePropertiesSelfHelp.json.cs index 93943af192fb..2eef36643aba 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsResourcePropertiesSelfHelp.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsResourcePropertiesSelfHelp.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionsResourcePropertiesSelfHelp partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsResourcePropertiesSelfHelp FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsResourcePropertiesSelfHelp FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionsResourcePropertiesSelfHelp(json) : null; } @@ -77,11 +77,11 @@ internal SolutionsResourcePropertiesSelfHelp(Microsoft.Azure.PowerShell.Cmdlets. { return; } - {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ReplacementMapsSelfHelp.FromJson(__jsonReplacementMaps) : ReplacementMap;} - {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} - {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} - {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)Content;} - {_section = If( json?.PropertyT("sections"), out var __jsonSections) ? If( __jsonSections as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISectionSelfHelp) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SectionSelfHelp.FromJson(__u) )) ))() : null : Section;} + {_replacementMap = If( json?.PropertyT("replacementMaps"), out var __jsonReplacementMaps) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ReplacementMapsSelfHelp.FromJson(__jsonReplacementMaps) : _replacementMap;} + {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)_solutionId;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)_title;} + {_content = If( json?.PropertyT("content"), out var __jsonContent) ? (string)__jsonContent : (string)_content;} + {_section = If( json?.PropertyT("sections"), out var __jsonSections) ? If( __jsonSections as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISectionSelfHelp) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SectionSelfHelp.FromJson(__u) )) ))() : null : _section;} AfterFromJson(json); } @@ -105,23 +105,23 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._replacementMap ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._replacementMap.ToJson(null,serializationMode) : null, "replacementMaps" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._solutionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._solutionId.ToString()) : null, "solutionId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._title)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._title.ToString()) : null, "title" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._content)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._content.ToString()) : null, "content" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { if (null != this._section) { diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsTroubleshooters.PowerShell.cs similarity index 75% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsTroubleshooters.PowerShell.cs index 4e2d6065a7bf..8346cb450929 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsTroubleshooters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SolutionsTroubleshooters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SolutionsTroubleshooters(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SolutionsTroubleshooters(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,21 +111,21 @@ internal SolutionsTroubleshooters(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshootersInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshootersInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshootersInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshootersInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Summary")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Summary, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshootersInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshootersInternal)this).Summary, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -142,15 +140,15 @@ internal SolutionsTroubleshooters(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshootersInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshootersInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshootersInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshootersInternal)this).Title, global::System.Convert.ToString); } if (content.Contains("Summary")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal)this).Summary, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshootersInternal)this).Summary = (string) content.GetValueForProperty("Summary",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshootersInternal)this).Summary, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsTroubleshooters.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsTroubleshooters.TypeConverter.cs index ce17344424ca..30a2c5781369 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsTroubleshooters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsTroubleshooters.cs similarity index 89% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsTroubleshooters.cs index c3240f1685b4..6e6eb6822f82 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsTroubleshooters.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Troubleshooters in Solutions public partial class SolutionsTroubleshooters : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshootersInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshootersInternal { /// Backing field for property. @@ -48,6 +48,9 @@ public partial interface ISolutionsTroubleshooters : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution Id to identify single Solutions Troubleshooter", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] @@ -56,6 +59,9 @@ public partial interface ISolutionsTroubleshooters : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Troubleshooter summary", SerializedName = @"summary", PossibleTypes = new [] { typeof(string) })] @@ -64,6 +70,9 @@ public partial interface ISolutionsTroubleshooters : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Troubleshooter title", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsTroubleshooters.json.cs similarity index 93% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsTroubleshooters.json.cs index 04ec1e196cdb..00e1a32f340a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/SolutionsTroubleshooters.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SolutionsTroubleshooters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SolutionsTroubleshooters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionsTroubleshooters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionsTroubleshooters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SolutionsTroubleshooters(json) : null; } @@ -77,9 +77,9 @@ internal SolutionsTroubleshooters(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Ru { return; } - {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} - {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} - {_summary = If( json?.PropertyT("summary"), out var __jsonSummary) ? (string)__jsonSummary : (string)Summary;} + {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)_solutionId;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)_title;} + {_summary = If( json?.PropertyT("summary"), out var __jsonSummary) ? (string)__jsonSummary : (string)_summary;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Step.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Step.PowerShell.cs new file mode 100644 index 000000000000..c590fbe47130 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Step.PowerShell.cs @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + + /// Troubleshooter step + [System.ComponentModel.TypeConverter(typeof(StepTypeConverter))] + public partial class Step + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStep DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Step(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStep DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Step(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStep FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Step(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AutomatedCheckResults")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResults = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult) content.GetValueForProperty("AutomatedCheckResults",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResults, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.AutomatedCheckResultTypeConverter.ConvertFrom); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Guidance")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Guidance = (string) content.GetValueForProperty("Guidance",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Guidance, global::System.Convert.ToString); + } + if (content.Contains("ExecutionStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).ExecutionStatus = (string) content.GetValueForProperty("ExecutionStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).ExecutionStatus, global::System.Convert.ToString); + } + if (content.Contains("ExecutionStatusDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).ExecutionStatusDescription = (string) content.GetValueForProperty("ExecutionStatusDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).ExecutionStatusDescription, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("IsLastStep")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).IsLastStep = (bool?) content.GetValueForProperty("IsLastStep",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).IsLastStep, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Input = (System.Collections.Generic.List) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Input, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.StepInputTypeConverter.ConvertFrom)); + } + if (content.Contains("Insight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Insight = (System.Collections.Generic.List) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Insight, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.InsightTypeConverter.ConvertFrom)); + } + if (content.Contains("AutomatedCheckResultVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResultVersion = (string) content.GetValueForProperty("AutomatedCheckResultVersion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResultVersion, global::System.Convert.ToString); + } + if (content.Contains("AutomatedCheckResultStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResultStatus = (string) content.GetValueForProperty("AutomatedCheckResultStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResultStatus, global::System.Convert.ToString); + } + if (content.Contains("AutomatedCheckResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResult = (string) content.GetValueForProperty("AutomatedCheckResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResult, global::System.Convert.ToString); + } + if (content.Contains("AutomatedCheckResultType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResultType = (string) content.GetValueForProperty("AutomatedCheckResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResultType, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Step(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AutomatedCheckResults")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResults = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult) content.GetValueForProperty("AutomatedCheckResults",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResults, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.AutomatedCheckResultTypeConverter.ConvertFrom); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Title")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Title, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Guidance")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Guidance = (string) content.GetValueForProperty("Guidance",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Guidance, global::System.Convert.ToString); + } + if (content.Contains("ExecutionStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).ExecutionStatus = (string) content.GetValueForProperty("ExecutionStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).ExecutionStatus, global::System.Convert.ToString); + } + if (content.Contains("ExecutionStatusDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).ExecutionStatusDescription = (string) content.GetValueForProperty("ExecutionStatusDescription",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).ExecutionStatusDescription, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("IsLastStep")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).IsLastStep = (bool?) content.GetValueForProperty("IsLastStep",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).IsLastStep, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Input = (System.Collections.Generic.List) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Input, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.StepInputTypeConverter.ConvertFrom)); + } + if (content.Contains("Insight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Insight = (System.Collections.Generic.List) content.GetValueForProperty("Insight",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Insight, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.InsightTypeConverter.ConvertFrom)); + } + if (content.Contains("AutomatedCheckResultVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResultVersion = (string) content.GetValueForProperty("AutomatedCheckResultVersion",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResultVersion, global::System.Convert.ToString); + } + if (content.Contains("AutomatedCheckResultStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResultStatus = (string) content.GetValueForProperty("AutomatedCheckResultStatus",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResultStatus, global::System.Convert.ToString); + } + if (content.Contains("AutomatedCheckResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResult = (string) content.GetValueForProperty("AutomatedCheckResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResult, global::System.Convert.ToString); + } + if (content.Contains("AutomatedCheckResultType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResultType = (string) content.GetValueForProperty("AutomatedCheckResultType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AutomatedCheckResultType, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Troubleshooter step + [System.ComponentModel.TypeConverter(typeof(StepTypeConverter))] + public partial interface IStep + + { + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Step.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Step.TypeConverter.cs index 54dc00238c91..693e3538020c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Step.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStep ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStep).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Step.cs similarity index 62% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Step.cs index 91a7eeb21b57..f4085837aa45 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Step.cs @@ -3,46 +3,46 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Troubleshooter step public partial class Step : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStep, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal { /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo; } + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).AdditionalInfo; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult _automatedCheckResult; - - /// Only for AutomatedStep type - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult AutomatedCheckResult { get => (this._automatedCheckResult = this._automatedCheckResult ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResult()); set => this._automatedCheckResult = value; } + /// Insight Article Content + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string AutomatedCheckResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)AutomatedCheckResults).Result; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)AutomatedCheckResults).Result = value ?? null; } /// Status for automated check result [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string AutomatedCheckResultStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Status = value ?? null; } + public string AutomatedCheckResultStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)AutomatedCheckResults).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)AutomatedCheckResults).Status = value ?? null; } /// Type of Result. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? AutomatedCheckResultType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType)""); } + public string AutomatedCheckResultType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)AutomatedCheckResults).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)AutomatedCheckResults).Type = value ?? null; } /// Version for automated check result [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string AutomatedCheckResultVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Version = value ?? null; } + public string AutomatedCheckResultVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)AutomatedCheckResults).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResultInternal)AutomatedCheckResults).Version = value ?? null; } - /// Insight Article Content - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string AutomatedCheckResultsResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Result; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResultInternal)AutomatedCheckResult).Result = value ?? null; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult _automatedCheckResults; + + /// Only for AutomatedStep type + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult AutomatedCheckResults { get => (this._automatedCheckResults = this._automatedCheckResults ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.AutomatedCheckResult()); set => this._automatedCheckResults = value; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Code; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Code; } /// Backing field for property. private string _description; @@ -53,21 +53,21 @@ public partial class Step : /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Detail; } + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Detail; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail _error; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail _error; /// The error detail. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetail()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetail()); set => this._error = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus? _executionStatus; + private string _executionStatus; /// Status of Troubleshooter Step execution. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus? ExecutionStatus { get => this._executionStatus; set => this._executionStatus = value; } + public string ExecutionStatus { get => this._executionStatus; set => this._executionStatus = value; } /// Backing field for property. private string _executionStatusDescription; @@ -91,16 +91,16 @@ public partial class Step : public string Id { get => this._id; set => this._id = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput[] _input; + private System.Collections.Generic.List _input; [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput[] Input { get => this._input; set => this._input = value; } + public System.Collections.Generic.List Input { get => this._input; set => this._input = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] _insight; + private System.Collections.Generic.List _insight; [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get => this._insight; set => this._insight = value; } + public System.Collections.Generic.List Insight { get => this._insight; set => this._insight = value; } /// Backing field for property. private bool? _isLastStep; @@ -111,32 +111,32 @@ public partial class Step : /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Message; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).AdditionalInfo = value ?? null /* arrayOf */; } - /// Internal Acessors for AutomatedCheckResult - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.AutomatedCheckResult { get => (this._automatedCheckResult = this._automatedCheckResult ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResult()); set { {_automatedCheckResult = value;} } } + /// Internal Acessors for AutomatedCheckResults + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal.AutomatedCheckResults { get => (this._automatedCheckResults = this._automatedCheckResults ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.AutomatedCheckResult()); set { {_automatedCheckResults = value;} } } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Code = value ?? null; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Detail = value; } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Detail = value ?? null /* arrayOf */; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetail()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetail()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Message = value ?? null; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Target = value ?? null; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetailInternal)Error).Target; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetailInternal)Error).Target; } /// Backing field for property. private string _title; @@ -146,11 +146,11 @@ public partial class Step : public string Title { get => this._title; set => this._title = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type? _type; + private string _type; /// Type of Troubleshooting step. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type? Type { get => this._type; set => this._type = value; } + public string Type { get => this._type; set => this._type = value; } /// Creates an new instance. public Step() @@ -166,14 +166,31 @@ public partial interface IStep : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } + /// Insight Article Content + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Insight Article Content", + SerializedName = @"result", + PossibleTypes = new [] { typeof(string) })] + string AutomatedCheckResult { get; set; } /// Status for automated check result [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Status for automated check result", SerializedName = @"status", PossibleTypes = new [] { typeof(string) })] @@ -182,30 +199,32 @@ public partial interface IStep : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of Result.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? AutomatedCheckResultType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Success", "Warning", "Error", "Information")] + string AutomatedCheckResultType { get; set; } /// Version for automated check result [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Version for automated check result", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] string AutomatedCheckResultVersion { get; set; } - /// Insight Article Content - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Insight Article Content", - SerializedName = @"result", - PossibleTypes = new [] { typeof(string) })] - string AutomatedCheckResultsResult { get; set; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -214,6 +233,9 @@ public partial interface IStep : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Step description.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -222,22 +244,32 @@ public partial interface IStep : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[] Detail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } /// Status of Troubleshooter Step execution. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Status of Troubleshooter Step execution.", SerializedName = @"executionStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus? ExecutionStatus { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Success", "Running", "Failed", "Warning")] + string ExecutionStatus { get; set; } /// This field has more detailed status description of the execution status. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This field has more detailed status description of the execution status.", SerializedName = @"executionStatusDescription", PossibleTypes = new [] { typeof(string) })] @@ -246,6 +278,9 @@ public partial interface IStep : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Get or sets the Step guidance.", SerializedName = @"guidance", PossibleTypes = new [] { typeof(string) })] @@ -254,6 +289,9 @@ public partial interface IStep : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Unique step id.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -262,22 +300,31 @@ public partial interface IStep : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"inputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput[] Input { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInput) })] + System.Collections.Generic.List Input { get; set; } [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"insights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight) })] + System.Collections.Generic.List Insight { get; set; } /// is this last step of the workflow. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"is this last step of the workflow.", SerializedName = @"isLastStep", PossibleTypes = new [] { typeof(bool) })] @@ -286,6 +333,9 @@ public partial interface IStep : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -294,6 +344,9 @@ public partial interface IStep : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] @@ -302,6 +355,9 @@ public partial interface IStep : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Step title.", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] @@ -310,10 +366,14 @@ public partial interface IStep : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of Troubleshooting step.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type? Type { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Decision", "Solution", "Insight", "AutomatedCheck", "Input")] + string Type { get; set; } } /// Troubleshooter step @@ -321,27 +381,29 @@ internal partial interface IStepInternal { /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorAdditionalInfo[] AdditionalInfo { get; set; } - /// Only for AutomatedStep type - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IAutomatedCheckResult AutomatedCheckResult { get; set; } + System.Collections.Generic.List AdditionalInfo { get; set; } + /// Insight Article Content + string AutomatedCheckResult { get; set; } /// Status for automated check result string AutomatedCheckResultStatus { get; set; } /// Type of Result. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType? AutomatedCheckResultType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Success", "Warning", "Error", "Information")] + string AutomatedCheckResultType { get; set; } /// Version for automated check result string AutomatedCheckResultVersion { get; set; } - /// Insight Article Content - string AutomatedCheckResultsResult { get; set; } + /// Only for AutomatedStep type + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IAutomatedCheckResult AutomatedCheckResults { get; set; } /// The error code. string Code { get; set; } /// Step description. string Description { get; set; } /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail[] Detail { get; set; } + System.Collections.Generic.List Detail { get; set; } /// The error detail. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorDetail Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorDetail Error { get; set; } /// Status of Troubleshooter Step execution. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus? ExecutionStatus { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Success", "Running", "Failed", "Warning")] + string ExecutionStatus { get; set; } /// This field has more detailed status description of the execution status. string ExecutionStatusDescription { get; set; } /// Get or sets the Step guidance. @@ -349,9 +411,9 @@ internal partial interface IStepInternal /// Unique step id. string Id { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput[] Input { get; set; } + System.Collections.Generic.List Input { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight[] Insight { get; set; } + System.Collections.Generic.List Insight { get; set; } /// is this last step of the workflow. bool? IsLastStep { get; set; } /// The error message. @@ -361,7 +423,8 @@ internal partial interface IStepInternal /// Step title. string Title { get; set; } /// Type of Troubleshooting step. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type? Type { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Decision", "Solution", "Insight", "AutomatedCheck", "Input")] + string Type { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Step.json.cs similarity index 83% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Step.json.cs index 068a7df8a97c..8743be81ea65 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Step.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Step.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Step partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStep. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStep. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStep FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Step(json) : null; } @@ -77,18 +75,18 @@ internal Step(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObjec { return; } - {_automatedCheckResult = If( json?.PropertyT("automatedCheckResults"), out var __jsonAutomatedCheckResults) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.AutomatedCheckResult.FromJson(__jsonAutomatedCheckResults) : AutomatedCheckResult;} - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorDetail.FromJson(__jsonError) : Error;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_guidance = If( json?.PropertyT("guidance"), out var __jsonGuidance) ? (string)__jsonGuidance : (string)Guidance;} - {_executionStatus = If( json?.PropertyT("executionStatus"), out var __jsonExecutionStatus) ? (string)__jsonExecutionStatus : (string)ExecutionStatus;} - {_executionStatusDescription = If( json?.PropertyT("executionStatusDescription"), out var __jsonExecutionStatusDescription) ? (string)__jsonExecutionStatusDescription : (string)ExecutionStatusDescription;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_isLastStep = If( json?.PropertyT("isLastStep"), out var __jsonIsLastStep) ? (bool?)__jsonIsLastStep : IsLastStep;} - {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? If( __jsonInputs as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepInput.FromJson(__u) )) ))() : null : Input;} - {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IInsight) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Insight.FromJson(__p) )) ))() : null : Insight;} + {_automatedCheckResults = If( json?.PropertyT("automatedCheckResults"), out var __jsonAutomatedCheckResults) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.AutomatedCheckResult.FromJson(__jsonAutomatedCheckResults) : _automatedCheckResults;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorDetail.FromJson(__jsonError) : _error;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)_title;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_guidance = If( json?.PropertyT("guidance"), out var __jsonGuidance) ? (string)__jsonGuidance : (string)_guidance;} + {_executionStatus = If( json?.PropertyT("executionStatus"), out var __jsonExecutionStatus) ? (string)__jsonExecutionStatus : (string)_executionStatus;} + {_executionStatusDescription = If( json?.PropertyT("executionStatusDescription"), out var __jsonExecutionStatusDescription) ? (string)__jsonExecutionStatusDescription : (string)_executionStatusDescription;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_isLastStep = If( json?.PropertyT("isLastStep"), out var __jsonIsLastStep) ? (bool?)__jsonIsLastStep : _isLastStep;} + {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? If( __jsonInputs as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInput) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.StepInput.FromJson(__u) )) ))() : null : _input;} + {_insight = If( json?.PropertyT("insights"), out var __jsonInsights) ? If( __jsonInsights as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IInsight) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Insight.FromJson(__p) )) ))() : null : _insight;} AfterFromJson(json); } @@ -111,7 +109,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - AddIf( null != this._automatedCheckResult ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._automatedCheckResult.ToJson(null,serializationMode) : null, "automatedCheckResults" ,container.Add ); + AddIf( null != this._automatedCheckResults ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._automatedCheckResults.ToJson(null,serializationMode) : null, "automatedCheckResults" ,container.Add ); AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); AddIf( null != (((object)this._title)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._title.ToString()) : null, "title" ,container.Add ); diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/StepInput.PowerShell.cs similarity index 51% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/StepInput.PowerShell.cs index b5d3566e8dc3..0d26a256486d 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/StepInput.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class StepInput partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInput DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new StepInput(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new StepInput(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,69 +111,69 @@ internal StepInput(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ResponseValidationProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationProperty = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties) content.GetValueForProperty("ResponseValidationProperty",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationProperty, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationProperty = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties) content.GetValueForProperty("ResponseValidationProperty",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationProperty, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ResponseValidationPropertiesTypeConverter.ConvertFrom); } if (content.Contains("QuestionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionId, global::System.Convert.ToString); } if (content.Contains("QuestionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType?) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionType = (string) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionType, global::System.Convert.ToString); } if (content.Contains("QuestionTitle")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionTitle = (string) content.GetValueForProperty("QuestionTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionTitle, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionTitle = (string) content.GetValueForProperty("QuestionTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionTitle, global::System.Convert.ToString); } if (content.Contains("QuestionContent")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContent = (string) content.GetValueForProperty("QuestionContent",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContent, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionContent = (string) content.GetValueForProperty("QuestionContent",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionContent, global::System.Convert.ToString); } if (content.Contains("QuestionContentType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContentType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType?) content.GetValueForProperty("QuestionContentType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContentType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionContentType = (string) content.GetValueForProperty("QuestionContentType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionContentType, global::System.Convert.ToString); } if (content.Contains("ResponseHint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseHint = (string) content.GetValueForProperty("ResponseHint",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseHint, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseHint = (string) content.GetValueForProperty("ResponseHint",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseHint, global::System.Convert.ToString); } if (content.Contains("RecommendedOption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).RecommendedOption = (string) content.GetValueForProperty("RecommendedOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).RecommendedOption, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).RecommendedOption = (string) content.GetValueForProperty("RecommendedOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).RecommendedOption, global::System.Convert.ToString); } if (content.Contains("SelectedOptionValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).SelectedOptionValue = (string) content.GetValueForProperty("SelectedOptionValue",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).SelectedOptionValue, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).SelectedOptionValue = (string) content.GetValueForProperty("SelectedOptionValue",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).SelectedOptionValue, global::System.Convert.ToString); } if (content.Contains("ResponseOption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseOption = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption[]) content.GetValueForProperty("ResponseOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseOption, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseOptionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseOption = (System.Collections.Generic.List) content.GetValueForProperty("ResponseOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseOption, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ResponseOptionTypeConverter.ConvertFrom)); } if (content.Contains("ResponseValidationPropertyRegex")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyRegex = (string) content.GetValueForProperty("ResponseValidationPropertyRegex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyRegex, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyRegex = (string) content.GetValueForProperty("ResponseValidationPropertyRegex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyRegex, global::System.Convert.ToString); } if (content.Contains("ResponseValidationPropertyValidationScope")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationScope = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope?) content.GetValueForProperty("ResponseValidationPropertyValidationScope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationScope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyValidationScope = (string) content.GetValueForProperty("ResponseValidationPropertyValidationScope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyValidationScope, global::System.Convert.ToString); } if (content.Contains("ResponseValidationPropertyMaxLength")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyMaxLength = (long?) content.GetValueForProperty("ResponseValidationPropertyMaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyMaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyMaxLength = (long?) content.GetValueForProperty("ResponseValidationPropertyMaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyMaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("ResponseValidationPropertyIsRequired")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyIsRequired = (bool?) content.GetValueForProperty("ResponseValidationPropertyIsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyIsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyIsRequired = (bool?) content.GetValueForProperty("ResponseValidationPropertyIsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyIsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ResponseValidationPropertyValidationErrorMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage = (string) content.GetValueForProperty("ResponseValidationPropertyValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage = (string) content.GetValueForProperty("ResponseValidationPropertyValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -188,63 +188,63 @@ internal StepInput(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ResponseValidationProperty")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationProperty = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties) content.GetValueForProperty("ResponseValidationProperty",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationProperty, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationProperty = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties) content.GetValueForProperty("ResponseValidationProperty",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationProperty, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ResponseValidationPropertiesTypeConverter.ConvertFrom); } if (content.Contains("QuestionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionId, global::System.Convert.ToString); } if (content.Contains("QuestionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType?) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionType = (string) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionType, global::System.Convert.ToString); } if (content.Contains("QuestionTitle")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionTitle = (string) content.GetValueForProperty("QuestionTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionTitle, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionTitle = (string) content.GetValueForProperty("QuestionTitle",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionTitle, global::System.Convert.ToString); } if (content.Contains("QuestionContent")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContent = (string) content.GetValueForProperty("QuestionContent",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContent, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionContent = (string) content.GetValueForProperty("QuestionContent",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionContent, global::System.Convert.ToString); } if (content.Contains("QuestionContentType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContentType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType?) content.GetValueForProperty("QuestionContentType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).QuestionContentType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionContentType = (string) content.GetValueForProperty("QuestionContentType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).QuestionContentType, global::System.Convert.ToString); } if (content.Contains("ResponseHint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseHint = (string) content.GetValueForProperty("ResponseHint",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseHint, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseHint = (string) content.GetValueForProperty("ResponseHint",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseHint, global::System.Convert.ToString); } if (content.Contains("RecommendedOption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).RecommendedOption = (string) content.GetValueForProperty("RecommendedOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).RecommendedOption, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).RecommendedOption = (string) content.GetValueForProperty("RecommendedOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).RecommendedOption, global::System.Convert.ToString); } if (content.Contains("SelectedOptionValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).SelectedOptionValue = (string) content.GetValueForProperty("SelectedOptionValue",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).SelectedOptionValue, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).SelectedOptionValue = (string) content.GetValueForProperty("SelectedOptionValue",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).SelectedOptionValue, global::System.Convert.ToString); } if (content.Contains("ResponseOption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseOption = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption[]) content.GetValueForProperty("ResponseOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseOption, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseOptionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseOption = (System.Collections.Generic.List) content.GetValueForProperty("ResponseOption",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseOption, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ResponseOptionTypeConverter.ConvertFrom)); } if (content.Contains("ResponseValidationPropertyRegex")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyRegex = (string) content.GetValueForProperty("ResponseValidationPropertyRegex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyRegex, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyRegex = (string) content.GetValueForProperty("ResponseValidationPropertyRegex",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyRegex, global::System.Convert.ToString); } if (content.Contains("ResponseValidationPropertyValidationScope")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationScope = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope?) content.GetValueForProperty("ResponseValidationPropertyValidationScope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationScope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyValidationScope = (string) content.GetValueForProperty("ResponseValidationPropertyValidationScope",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyValidationScope, global::System.Convert.ToString); } if (content.Contains("ResponseValidationPropertyMaxLength")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyMaxLength = (long?) content.GetValueForProperty("ResponseValidationPropertyMaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyMaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyMaxLength = (long?) content.GetValueForProperty("ResponseValidationPropertyMaxLength",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyMaxLength, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("ResponseValidationPropertyIsRequired")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyIsRequired = (bool?) content.GetValueForProperty("ResponseValidationPropertyIsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyIsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyIsRequired = (bool?) content.GetValueForProperty("ResponseValidationPropertyIsRequired",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyIsRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ResponseValidationPropertyValidationErrorMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage = (string) content.GetValueForProperty("ResponseValidationPropertyValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage = (string) content.GetValueForProperty("ResponseValidationPropertyValidationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal)this).ResponseValidationPropertyValidationErrorMessage, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/StepInput.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/StepInput.TypeConverter.cs index c8130e9ff517..b37cb639c251 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/StepInput.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInput ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInput).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/StepInput.cs similarity index 67% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/StepInput.cs index 7ac4a2a83586..7e3036402c7c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/StepInput.cs @@ -3,18 +3,18 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Details of step input. public partial class StepInput : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInput, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal { /// Internal Acessors for ResponseValidationProperty - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInputInternal.ResponseValidationProperty { get => (this._responseValidationProperty = this._responseValidationProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationProperties()); set { {_responseValidationProperty = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInputInternal.ResponseValidationProperty { get => (this._responseValidationProperty = this._responseValidationProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ResponseValidationProperties()); set { {_responseValidationProperty = value;} } } /// Backing field for property. private string _questionContent; @@ -24,11 +24,11 @@ public partial class StepInput : public string QuestionContent { get => this._questionContent; set => this._questionContent = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType? _questionContentType; + private string _questionContentType; /// Default is Text. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType? QuestionContentType { get => this._questionContentType; set => this._questionContentType = value; } + public string QuestionContentType { get => this._questionContentType; set => this._questionContentType = value; } /// Backing field for property. private string _questionId; @@ -45,11 +45,11 @@ public partial class StepInput : public string QuestionTitle { get => this._questionTitle; set => this._questionTitle = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? _questionType; + private string _questionType; /// Type of Question [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? QuestionType { get => this._questionType; set => this._questionType = value; } + public string QuestionType { get => this._questionType; set => this._questionType = value; } /// Backing field for property. private string _recommendedOption; @@ -66,37 +66,37 @@ public partial class StepInput : public string ResponseHint { get => this._responseHint; set => this._responseHint = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption[] _responseOption; + private System.Collections.Generic.List _responseOption; [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption[] ResponseOption { get => this._responseOption; set => this._responseOption = value; } + public System.Collections.Generic.List ResponseOption { get => this._responseOption; set => this._responseOption = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties _responseValidationProperty; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties _responseValidationProperty; /// Troubleshooter step input response validation properties [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties ResponseValidationProperty { get => (this._responseValidationProperty = this._responseValidationProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationProperties()); set => this._responseValidationProperty = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties ResponseValidationProperty { get => (this._responseValidationProperty = this._responseValidationProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ResponseValidationProperties()); set => this._responseValidationProperty = value; } /// Default True [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public bool? ResponseValidationPropertyIsRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).IsRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).IsRequired = value ?? default(bool); } + public bool? ResponseValidationPropertyIsRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)ResponseValidationProperty).IsRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)ResponseValidationProperty).IsRequired = value ?? default(bool); } /// Max text input (open Ended Text). [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public long? ResponseValidationPropertyMaxLength { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).MaxLength; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).MaxLength = value ?? default(long); } + public long? ResponseValidationPropertyMaxLength { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)ResponseValidationProperty).MaxLength; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)ResponseValidationProperty).MaxLength = value ?? default(long); } /// Regex used for the input validation. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string ResponseValidationPropertyRegex { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).Regex; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).Regex = value ?? null; } + public string ResponseValidationPropertyRegex { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)ResponseValidationProperty).Regex; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)ResponseValidationProperty).Regex = value ?? null; } /// Validation Error Message. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public string ResponseValidationPropertyValidationErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationErrorMessage = value ?? null; } + public string ResponseValidationPropertyValidationErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationErrorMessage = value ?? null; } /// Validation scope [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? ResponseValidationPropertyValidationScope { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationScope; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationScope = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope)""); } + public string ResponseValidationPropertyValidationScope { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationScope; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationPropertiesInternal)ResponseValidationProperty).ValidationScope = value ?? null; } /// Backing field for property. private string _selectedOptionValue; @@ -119,6 +119,9 @@ public partial interface IStepInput : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"User question content.", SerializedName = @"questionContent", PossibleTypes = new [] { typeof(string) })] @@ -127,14 +130,21 @@ public partial interface IStepInput : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Default is Text.", SerializedName = @"questionContentType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType? QuestionContentType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Text", "Html", "Markdown")] + string QuestionContentType { get; set; } /// Use Index as QuestionId. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Use Index as QuestionId.", SerializedName = @"questionId", PossibleTypes = new [] { typeof(string) })] @@ -143,6 +153,9 @@ public partial interface IStepInput : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Question title", SerializedName = @"questionTitle", PossibleTypes = new [] { typeof(string) })] @@ -151,14 +164,21 @@ public partial interface IStepInput : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of Question", SerializedName = @"questionType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? QuestionType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("RadioButton", "Dropdown", "TextInput", "MultiLineInfoBox", "DateTimePicker", "MultiSelect")] + string QuestionType { get; set; } /// Result of Automate step. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Result of Automate step.", SerializedName = @"recommendedOption", PossibleTypes = new [] { typeof(string) })] @@ -167,6 +187,9 @@ public partial interface IStepInput : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Place holder text for response hints.", SerializedName = @"responseHint", PossibleTypes = new [] { typeof(string) })] @@ -175,14 +198,20 @@ public partial interface IStepInput : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"responseOptions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption[] ResponseOption { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOption) })] + System.Collections.Generic.List ResponseOption { get; set; } /// Default True [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Default True", SerializedName = @"isRequired", PossibleTypes = new [] { typeof(bool) })] @@ -191,6 +220,9 @@ public partial interface IStepInput : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Max text input (open Ended Text).", SerializedName = @"maxLength", PossibleTypes = new [] { typeof(long) })] @@ -199,6 +231,9 @@ public partial interface IStepInput : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Regex used for the input validation.", SerializedName = @"regex", PossibleTypes = new [] { typeof(string) })] @@ -207,6 +242,9 @@ public partial interface IStepInput : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Validation Error Message.", SerializedName = @"validationErrorMessage", PossibleTypes = new [] { typeof(string) })] @@ -215,14 +253,21 @@ public partial interface IStepInput : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Validation scope", SerializedName = @"validationScope", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? ResponseValidationPropertyValidationScope { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("None", "URLFormat", "GuidFormat", "IpAddressFormat", "NumberOnlyFormat")] + string ResponseValidationPropertyValidationScope { get; set; } /// Text of response that was selected. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Text of response that was selected.", SerializedName = @"selectedOptionValue", PossibleTypes = new [] { typeof(string) })] @@ -236,21 +281,23 @@ internal partial interface IStepInputInternal /// User question content. string QuestionContent { get; set; } /// Default is Text. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType? QuestionContentType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Text", "Html", "Markdown")] + string QuestionContentType { get; set; } /// Use Index as QuestionId. string QuestionId { get; set; } /// Question title string QuestionTitle { get; set; } /// Type of Question - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? QuestionType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("RadioButton", "Dropdown", "TextInput", "MultiLineInfoBox", "DateTimePicker", "MultiSelect")] + string QuestionType { get; set; } /// Result of Automate step. string RecommendedOption { get; set; } /// Place holder text for response hints. string ResponseHint { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption[] ResponseOption { get; set; } + System.Collections.Generic.List ResponseOption { get; set; } /// Troubleshooter step input response validation properties - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseValidationProperties ResponseValidationProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseValidationProperties ResponseValidationProperty { get; set; } /// Default True bool? ResponseValidationPropertyIsRequired { get; set; } /// Max text input (open Ended Text). @@ -260,7 +307,8 @@ internal partial interface IStepInputInternal /// Validation Error Message. string ResponseValidationPropertyValidationErrorMessage { get; set; } /// Validation scope - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope? ResponseValidationPropertyValidationScope { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("None", "URLFormat", "GuidFormat", "IpAddressFormat", "NumberOnlyFormat")] + string ResponseValidationPropertyValidationScope { get; set; } /// Text of response that was selected. string SelectedOptionValue { get; set; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/StepInput.json.cs similarity index 89% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/StepInput.json.cs index c60494c03578..87b3201502ef 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/StepInput.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/StepInput.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class StepInput partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInput. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStepInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInput. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStepInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new StepInput(json) : null; } @@ -77,16 +75,16 @@ internal StepInput(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Json { return; } - {_responseValidationProperty = If( json?.PropertyT("responseValidationProperties"), out var __jsonResponseValidationProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseValidationProperties.FromJson(__jsonResponseValidationProperties) : ResponseValidationProperty;} - {_questionId = If( json?.PropertyT("questionId"), out var __jsonQuestionId) ? (string)__jsonQuestionId : (string)QuestionId;} - {_questionType = If( json?.PropertyT("questionType"), out var __jsonQuestionType) ? (string)__jsonQuestionType : (string)QuestionType;} - {_questionTitle = If( json?.PropertyT("questionTitle"), out var __jsonQuestionTitle) ? (string)__jsonQuestionTitle : (string)QuestionTitle;} - {_questionContent = If( json?.PropertyT("questionContent"), out var __jsonQuestionContent) ? (string)__jsonQuestionContent : (string)QuestionContent;} - {_questionContentType = If( json?.PropertyT("questionContentType"), out var __jsonQuestionContentType) ? (string)__jsonQuestionContentType : (string)QuestionContentType;} - {_responseHint = If( json?.PropertyT("responseHint"), out var __jsonResponseHint) ? (string)__jsonResponseHint : (string)ResponseHint;} - {_recommendedOption = If( json?.PropertyT("recommendedOption"), out var __jsonRecommendedOption) ? (string)__jsonRecommendedOption : (string)RecommendedOption;} - {_selectedOptionValue = If( json?.PropertyT("selectedOptionValue"), out var __jsonSelectedOptionValue) ? (string)__jsonSelectedOptionValue : (string)SelectedOptionValue;} - {_responseOption = If( json?.PropertyT("responseOptions"), out var __jsonResponseOptions) ? If( __jsonResponseOptions as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IResponseOption) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ResponseOption.FromJson(__u) )) ))() : null : ResponseOption;} + {_responseValidationProperty = If( json?.PropertyT("responseValidationProperties"), out var __jsonResponseValidationProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ResponseValidationProperties.FromJson(__jsonResponseValidationProperties) : _responseValidationProperty;} + {_questionId = If( json?.PropertyT("questionId"), out var __jsonQuestionId) ? (string)__jsonQuestionId : (string)_questionId;} + {_questionType = If( json?.PropertyT("questionType"), out var __jsonQuestionType) ? (string)__jsonQuestionType : (string)_questionType;} + {_questionTitle = If( json?.PropertyT("questionTitle"), out var __jsonQuestionTitle) ? (string)__jsonQuestionTitle : (string)_questionTitle;} + {_questionContent = If( json?.PropertyT("questionContent"), out var __jsonQuestionContent) ? (string)__jsonQuestionContent : (string)_questionContent;} + {_questionContentType = If( json?.PropertyT("questionContentType"), out var __jsonQuestionContentType) ? (string)__jsonQuestionContentType : (string)_questionContentType;} + {_responseHint = If( json?.PropertyT("responseHint"), out var __jsonResponseHint) ? (string)__jsonResponseHint : (string)_responseHint;} + {_recommendedOption = If( json?.PropertyT("recommendedOption"), out var __jsonRecommendedOption) ? (string)__jsonRecommendedOption : (string)_recommendedOption;} + {_selectedOptionValue = If( json?.PropertyT("selectedOptionValue"), out var __jsonSelectedOptionValue) ? (string)__jsonSelectedOptionValue : (string)_selectedOptionValue;} + {_responseOption = If( json?.PropertyT("responseOptions"), out var __jsonResponseOptions) ? If( __jsonResponseOptions as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResponseOption) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ResponseOption.FromJson(__u) )) ))() : null : _responseOption;} AfterFromJson(json); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/SystemData.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SystemData.PowerShell.cs similarity index 67% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/SystemData.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SystemData.PowerShell.cs index 766ec32ecef6..bc6bab3cd2d0 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/SystemData.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SystemData(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDa /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -111,33 +111,33 @@ internal SystemData(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("CreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); } if (content.Contains("CreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.SelfHelp.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.SelfHelp.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); } if (content.Contains("CreatedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); } if (content.Contains("CreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.SelfHelp.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.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.SelfHelp.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/SystemData.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SystemData.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/SystemData.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SystemData.TypeConverter.cs index 1cfa4dcf3862..93a6a9c4afe9 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/SystemData.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/SystemData.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SystemData.cs similarity index 78% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/SystemData.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SystemData.cs index bd5811f20e92..039024ac89c5 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/SystemData.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Metadata pertaining to creation and last modification of the resource. public partial class SystemData : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemDataInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Support.CreatedByType? _createdByType; + private string _createdByType; /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; } + 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.SelfHelp.Support.CreatedByType? _lastModifiedByType; + private string _lastModifiedByType; /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + 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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? CreatedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType? LastModifiedByType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Support.CreatedByType? CreatedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Support.CreatedByType? LastModifiedByType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/SystemData.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SystemData.json.cs similarity index 93% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/SystemData.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/SystemData.json.cs index f269c889a4ac..0a7f8ddc6cbc 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api40/SystemData.json.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class SystemData partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new SystemData(json) : null; } @@ -77,12 +75,12 @@ internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Jso { 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/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TriggerCriterion.PowerShell.cs similarity index 79% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TriggerCriterion.PowerShell.cs index 030b1c682e40..f1c2e4a1d486 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TriggerCriterion.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -66,27 +66,27 @@ public partial class TriggerCriterion partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TriggerCriterion(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TriggerCriterion(content); } @@ -96,7 +96,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -116,7 +116,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -131,17 +131,17 @@ internal TriggerCriterion(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterionInternal)this).Value, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -156,11 +156,11 @@ internal TriggerCriterion(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterionInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterionInternal)this).Value, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TriggerCriterion.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TriggerCriterion.TypeConverter.cs index af543952b34c..8fe13a0c0dd6 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TriggerCriterion.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TriggerCriterion.cs similarity index 76% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TriggerCriterion.cs index 9fbdcf006122..152a69126721 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TriggerCriterion.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -12,16 +12,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview /// PUT request. ReplacementKey is the only supported trigger type for Solution PATCH request. /// public partial class TriggerCriterion : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterionInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterionInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name? _name; + private string _name; /// Trigger criterion name. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name? Name { get => this._name; set => this._name = value; } + public string Name { get => this._name; set => this._name = value; } /// Backing field for property. private string _value; @@ -45,14 +45,21 @@ public partial interface ITriggerCriterion : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Trigger criterion name.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name? Name { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("SolutionId", "ProblemClassificationId", "ReplacementKey")] + string Name { get; set; } /// Trigger criterion value. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Trigger criterion value.", SerializedName = @"value", PossibleTypes = new [] { typeof(string) })] @@ -65,7 +72,8 @@ internal partial interface ITriggerCriterionInternal { /// Trigger criterion name. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name? Name { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("SolutionId", "ProblemClassificationId", "ReplacementKey")] + string Name { get; set; } /// Trigger criterion value. string Value { get; set; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TriggerCriterion.json.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TriggerCriterion.json.cs index fceab28d996b..079f7472876d 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TriggerCriterion.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TriggerCriterion.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -57,13 +57,13 @@ public partial class TriggerCriterion partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new TriggerCriterion(json) : null; } @@ -105,8 +105,8 @@ internal TriggerCriterion(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Js { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)_value;} AfterFromJson(json); } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstanceProperties.PowerShell.cs similarity index 65% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstanceProperties.PowerShell.cs index 541ab43ce412..344a8a07d4ee 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstanceProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class TroubleshooterInstanceProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TroubleshooterInstanceProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TroubleshooterInstanceProperties(content); } @@ -95,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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. @@ -130,25 +128,25 @@ internal TroubleshooterInstanceProperties(global::System.Collections.IDictionary // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("Step")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Step = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[]) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Step, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).Step = (System.Collections.Generic.List) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).Step, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.StepTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -163,19 +161,19 @@ internal TroubleshooterInstanceProperties(global::System.Management.Automation.P // actually deserialize if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("Step")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Step = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[]) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal)this).Step, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).Step = (System.Collections.Generic.List) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)this).Step, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.StepTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstanceProperties.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstanceProperties.TypeConverter.cs index 438b864794b9..421ede5ddecf 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstanceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstanceProperties.cs similarity index 61% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstanceProperties.cs index 8a39e4202d26..779ea4bc2b71 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstanceProperties.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.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Troubleshooter Instance properties. public partial class TroubleshooterInstanceProperties : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal { /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for Step - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesInternal.Step { get => this._step; set { {_step = value;} } } + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal.Step { get => this._step; set { {_step = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters _parameter; /// Client input parameters to run Troubleshooter Resource [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParameters()); set => this._parameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstancePropertiesParameters()); set => this._parameter = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? _provisioningState; + private string _provisioningState; /// Status of troubleshooter provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? ProvisioningState { get => this._provisioningState; } + public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. private string _solutionId; @@ -41,11 +41,11 @@ public partial class TroubleshooterInstanceProperties : public string SolutionId { get => this._solutionId; set => this._solutionId = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] _step; + private System.Collections.Generic.List _step; /// List of step object. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Step { get => this._step; } + public System.Collections.Generic.List Step { get => this._step; } /// Creates an new instance. public TroubleshooterInstanceProperties() @@ -61,22 +61,32 @@ public partial interface ITroubleshooterInstanceProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Client input parameters to run Troubleshooter Resource", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } /// Status of troubleshooter provisioning. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Status of troubleshooter provisioning.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Running", "AutoContinue")] + string ProvisioningState { get; } /// Solution Id to identify single troubleshooter. [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Solution Id to identify single troubleshooter.", SerializedName = @"solutionId", PossibleTypes = new [] { typeof(string) })] @@ -85,10 +95,13 @@ public partial interface ITroubleshooterInstanceProperties : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"List of step object.", SerializedName = @"steps", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Step { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStep) })] + System.Collections.Generic.List Step { get; } } /// Troubleshooter Instance properties. @@ -96,13 +109,14 @@ internal partial interface ITroubleshooterInstancePropertiesInternal { /// Client input parameters to run Troubleshooter Resource - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } /// Status of troubleshooter provisioning. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Running", "AutoContinue")] + string ProvisioningState { get; set; } /// Solution Id to identify single troubleshooter. string SolutionId { get; set; } /// List of step object. - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[] Step { get; set; } + System.Collections.Generic.List Step { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstanceProperties.json.cs similarity index 88% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstanceProperties.json.cs index f3e8cc97f3d7..d7f5afb0c0ae 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstanceProperties.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstanceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TroubleshooterInstanceProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new TroubleshooterInstanceProperties(json) : null; } @@ -86,11 +86,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( } AddIf( null != (((object)this._solutionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._solutionId.ToString()) : null, "solutionId" ,container.Add ); AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeRead)) { if (null != this._step) { @@ -118,10 +118,10 @@ internal TroubleshooterInstanceProperties(Microsoft.Azure.PowerShell.Cmdlets.Sel { return; } - {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)SolutionId;} - {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParameters.FromJson(__jsonParameters) : Parameter;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_step = If( json?.PropertyT("steps"), out var __jsonSteps) ? If( __jsonSteps as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.Step.FromJson(__u) )) ))() : null : Step;} + {_solutionId = If( json?.PropertyT("solutionId"), out var __jsonSolutionId) ? (string)__jsonSolutionId : (string)_solutionId;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstancePropertiesParameters.FromJson(__jsonParameters) : _parameter;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_step = If( json?.PropertyT("steps"), out var __jsonSteps) ? If( __jsonSteps as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStep) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Step.FromJson(__u) )) ))() : null : _step;} AfterFromJson(json); } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.PowerShell.cs similarity index 87% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.PowerShell.cs index 5b2c6a4abb90..68cec91ccea1 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class TroubleshooterInstancePropertiesParameters partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TroubleshooterInstancePropertiesParameters(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TroubleshooterInstancePropertiesParameters(content); } @@ -98,7 +98,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -118,7 +118,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -137,7 +137,7 @@ internal TroubleshooterInstancePropertiesParameters(global::System.Collections.I } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.TypeConverter.cs index 044036ed48ff..07350d9f6bef 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.cs similarity index 78% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.cs index 74721b933869..90a3877b019e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Client input parameters to run Troubleshooter Resource public partial class TroubleshooterInstancePropertiesParameters : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParametersInternal { /// diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.dictionary.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.dictionary.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.dictionary.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.dictionary.cs index b61e89ce9462..d652b6f19100 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.dictionary.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstancePropertiesParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.json.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.json.cs index 7445a54aad47..7a93c126fe41 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterInstancePropertiesParameters.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterInstancePropertiesParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TroubleshooterInstancePropertiesParameters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new TroubleshooterInstancePropertiesParameters(json) : null; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResource.PowerShell.cs similarity index 50% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResource.PowerShell.cs index aacd4c6bee6b..9deb17d03c14 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class TroubleshooterResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TroubleshooterResource(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TroubleshooterResource(content); } @@ -95,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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. @@ -130,69 +128,69 @@ internal TroubleshooterResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstancePropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("Step")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Step = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[]) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Step, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).Step = (System.Collections.Generic.List) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).Step, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.StepTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -207,63 +205,63 @@ internal TroubleshooterResource(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstanceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstancePropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("SolutionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).SolutionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).SolutionId = (string) content.GetValueForProperty("SolutionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).SolutionId, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstancePropertiesParametersTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).ProvisioningState, global::System.Convert.ToString); } if (content.Contains("Step")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Step = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IStep[]) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResourceInternal)this).Step, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.StepTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).Step = (System.Collections.Generic.List) content.GetValueForProperty("Step",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal)this).Step, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.StepTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResource.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResource.TypeConverter.cs index 7f3cea063254..d55dbe831f7c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResource.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResource.cs new file mode 100644 index 000000000000..9cba1dfaa26f --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResource.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + + /// Troubleshooter response. + public partial class TroubleshooterResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstanceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for Step + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResourceInternal.Step { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)Property).Step; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)Property).Step = value ?? null /* arrayOf */; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Name; } + + /// Client input parameters to run Troubleshooter Resource + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)Property).Parameter = value ?? null /* model class */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties _property; + + /// Troubleshooter Instance properties. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstanceProperties()); set => this._property = value; } + + /// Status of troubleshooter provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Solution Id to identify single troubleshooter. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public string SolutionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)Property).SolutionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)Property).SolutionId = value ?? null; } + + /// List of step object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Step { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesInternal)Property).Step; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public TroubleshooterResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// Troubleshooter response. + public partial interface ITroubleshooterResource : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResource + { + /// Client input parameters to run Troubleshooter Resource + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Client input parameters to run Troubleshooter Resource", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } + /// Status of troubleshooter provisioning. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Status of troubleshooter provisioning.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Running", "AutoContinue")] + string ProvisioningState { get; } + /// Solution Id to identify single troubleshooter. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Solution Id to identify single troubleshooter.", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + string SolutionId { get; set; } + /// List of step object. + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of step object.", + SerializedName = @"steps", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IStep) })] + System.Collections.Generic.List Step { get; } + + } + /// Troubleshooter response. + internal partial interface ITroubleshooterResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IProxyResourceInternal + { + /// Client input parameters to run Troubleshooter Resource + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters Parameter { get; set; } + /// Troubleshooter Instance properties. + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstanceProperties Property { get; set; } + /// Status of troubleshooter provisioning. + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Running", "AutoContinue")] + string ProvisioningState { get; set; } + /// Solution Id to identify single troubleshooter. + string SolutionId { get; set; } + /// List of step object. + System.Collections.Generic.List Step { get; set; } + + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResource.json.cs similarity index 91% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResource.json.cs index d108e0b271fa..471b1bd377a4 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResource.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TroubleshooterResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new TroubleshooterResource(json) : null; } @@ -84,7 +84,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode ToJson( { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; @@ -102,8 +102,8 @@ internal TroubleshooterResource(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runt { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterInstanceProperties.FromJson(__jsonProperties) : Property;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterInstanceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResponse.PowerShell.cs similarity index 74% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResponse.PowerShell.cs index 6332db8147e0..d39322c03ec0 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class TroubleshooterResponse partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TroubleshooterResponse(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TroubleshooterResponse(content); } @@ -95,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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. @@ -130,21 +128,21 @@ internal TroubleshooterResponse(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("QuestionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponseInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponseInternal)this).QuestionId, global::System.Convert.ToString); } if (content.Contains("QuestionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType?) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponseInternal)this).QuestionType = (string) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponseInternal)this).QuestionType, global::System.Convert.ToString); } if (content.Contains("Response")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).Response = (string) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).Response, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponseInternal)this).Response = (string) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponseInternal)this).Response, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -159,15 +157,15 @@ internal TroubleshooterResponse(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("QuestionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponseInternal)this).QuestionId = (string) content.GetValueForProperty("QuestionId",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponseInternal)this).QuestionId, global::System.Convert.ToString); } if (content.Contains("QuestionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionType = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType?) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).QuestionType, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponseInternal)this).QuestionType = (string) content.GetValueForProperty("QuestionType",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponseInternal)this).QuestionType, global::System.Convert.ToString); } if (content.Contains("Response")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).Response = (string) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal)this).Response, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponseInternal)this).Response = (string) content.GetValueForProperty("Response",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponseInternal)this).Response, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResponse.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResponse.TypeConverter.cs index f6db1b116281..8b463bbe7212 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResponse.cs similarity index 76% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResponse.cs index a5b23681316b..d6f4ea35491f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResponse.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// User Response for Troubleshooter continue request public partial class TroubleshooterResponse : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponseInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class TroubleshooterResponse : public string QuestionId { get => this._questionId; set => this._questionId = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? _questionType; + private string _questionType; /// Type of Question [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? QuestionType { get => this._questionType; set => this._questionType = value; } + public string QuestionType { get => this._questionType; set => this._questionType = value; } /// Backing field for property. private string _response; @@ -50,6 +50,9 @@ public partial interface ITroubleshooterResponse : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"id of the question.", SerializedName = @"questionId", PossibleTypes = new [] { typeof(string) })] @@ -58,16 +61,23 @@ public partial interface ITroubleshooterResponse : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Type of Question", SerializedName = @"questionType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? QuestionType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("RadioButton", "Dropdown", "TextInput", "MultiLineInfoBox", "DateTimePicker", "MultiSelect")] + string QuestionType { get; set; } /// /// Response key for SingleInput. For Multi-line test/open ended question it is free form text /// [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Response key for SingleInput. For Multi-line test/open ended question it is free form text", SerializedName = @"response", PossibleTypes = new [] { typeof(string) })] @@ -81,7 +91,8 @@ internal partial interface ITroubleshooterResponseInternal /// id of the question. string QuestionId { get; set; } /// Type of Question - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType? QuestionType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PSArgumentCompleterAttribute("RadioButton", "Dropdown", "TextInput", "MultiLineInfoBox", "DateTimePicker", "MultiSelect")] + string QuestionType { get; set; } /// /// Response key for SingleInput. For Multi-line test/open ended question it is free form text /// diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResponse.json.cs similarity index 94% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResponse.json.cs index fab99a79a16d..5907c787685b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/TroubleshooterResponse.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshooterResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TroubleshooterResponse partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new TroubleshooterResponse(json) : null; } @@ -103,9 +103,9 @@ internal TroubleshooterResponse(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runt { return; } - {_questionId = If( json?.PropertyT("questionId"), out var __jsonQuestionId) ? (string)__jsonQuestionId : (string)QuestionId;} - {_questionType = If( json?.PropertyT("questionType"), out var __jsonQuestionType) ? (string)__jsonQuestionType : (string)QuestionType;} - {_response = If( json?.PropertyT("response"), out var __jsonResponse) ? (string)__jsonResponse : (string)Response;} + {_questionId = If( json?.PropertyT("questionId"), out var __jsonQuestionId) ? (string)__jsonQuestionId : (string)_questionId;} + {_questionType = If( json?.PropertyT("questionType"), out var __jsonQuestionType) ? (string)__jsonQuestionType : (string)_questionType;} + {_response = If( json?.PropertyT("response"), out var __jsonResponse) ? (string)__jsonResponse : (string)_response;} AfterFromJson(json); } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshootersContinueNoContentResponseHeaders.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshootersContinueNoContentResponseHeaders.cs index 225f511dac23..a173e1a7b917 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshootersContinueNoContentResponseHeaders.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshootersContinueNoContentResponseHeaders.cs @@ -42,6 +42,9 @@ public partial interface ITroubleshootersContinueNoContentResponseHeaders [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"Location", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshootersEndNoContentResponseHeaders.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshootersEndNoContentResponseHeaders.cs index 28514bb09897..4460bd73a007 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshootersEndNoContentResponseHeaders.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/TroubleshootersEndNoContentResponseHeaders.cs @@ -42,6 +42,9 @@ public partial interface ITroubleshootersEndNoContentResponseHeaders [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"Location", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Video.PowerShell.cs similarity index 77% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Video.PowerShell.cs index a9bb632d9b70..2e17ca8e459f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Video.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Video partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Video(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Video(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -128,21 +128,21 @@ internal Video(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("Src")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -157,15 +157,15 @@ internal Video(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("Src")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Video.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Video.TypeConverter.cs index 375df7bdc50a..58c0f410ba11 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Video.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Video.cs similarity index 74% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Video.cs index 62cc2f4eb530..513d00ee23bc 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Video.cs @@ -3,21 +3,20 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Video detail public partial class Video : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoInternal, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoInternal, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo __videoGroupVideo = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideo(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideo __videoGroupVideo = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupVideo(); /// Backing field for property. private string _replacementKey; @@ -28,11 +27,11 @@ public partial class Video : /// Link to the video [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Src { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)__videoGroupVideo).Src; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)__videoGroupVideo).Src = value ?? null; } + public string Src { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)__videoGroupVideo).Src; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)__videoGroupVideo).Src = value ?? null; } /// Title of the video [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Inherited)] - public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)__videoGroupVideo).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)__videoGroupVideo).Title = value ?? null; } + public string Title { get => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)__videoGroupVideo).Title; set => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)__videoGroupVideo).Title = value ?? null; } /// Validates that this object meets the validation criteria. /// an instance that will receive validation @@ -55,12 +54,15 @@ public Video() /// Video detail public partial interface IVideo : Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideo { /// Place holder used in HTML Content replace control with the insight content [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Place holder used in HTML Content replace control with the insight content", SerializedName = @"replacementKey", PossibleTypes = new [] { typeof(string) })] @@ -69,7 +71,7 @@ public partial interface IVideo : } /// Video detail internal partial interface IVideoInternal : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal { /// Place holder used in HTML Content replace control with the insight content string ReplacementKey { get; set; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Video.json.cs similarity index 92% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Video.json.cs index a4caae1b5f67..f1a799e2f301 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/Video.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Video.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Video partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideo FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideo FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new Video(json) : null; } @@ -102,8 +100,8 @@ internal Video(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObje { return; } - __videoGroupVideo = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideo(json); - {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)ReplacementKey;} + __videoGroupVideo = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupVideo(json); + {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)_replacementKey;} AfterFromJson(json); } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroup.PowerShell.cs similarity index 76% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroup.PowerShell.cs index f7f722ec98a4..72438bbedd59 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroup.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class VideoGroup partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new VideoGroup(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new VideoGroup(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -128,17 +128,17 @@ internal VideoGroup(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Video")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupInternal)this).Video = (System.Collections.Generic.List) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupInternal)this).Video, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupVideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupInternal)this).ReplacementKey, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -153,11 +153,11 @@ internal VideoGroup(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Video")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).Video = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo[]) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).Video, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideoTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupInternal)this).Video = (System.Collections.Generic.List) content.GetValueForProperty("Video",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupInternal)this).Video, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupVideoTypeConverter.ConvertFrom)); } if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupInternal)this).ReplacementKey, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroup.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroup.TypeConverter.cs index 9406e13c5b1b..c597a4a1f223 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroup.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroup.cs similarity index 73% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroup.cs index 5d41be82cc92..863e70e00cd6 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroup.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// Video group detail public partial class VideoGroup : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class VideoGroup : public string ReplacementKey { get => this._replacementKey; set => this._replacementKey = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo[] _video; + private System.Collections.Generic.List _video; /// List of videos will be shown to customers [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo[] Video { get => this._video; set => this._video = value; } + public System.Collections.Generic.List Video { get => this._video; set => this._video = value; } /// Creates an new instance. public VideoGroup() @@ -41,6 +41,9 @@ public partial interface IVideoGroup : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Place holder used in HTML Content replace control with the insight content", SerializedName = @"replacementKey", PossibleTypes = new [] { typeof(string) })] @@ -49,10 +52,13 @@ public partial interface IVideoGroup : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"List of videos will be shown to customers", SerializedName = @"videos", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo[] Video { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideo) })] + System.Collections.Generic.List Video { get; set; } } /// Video group detail @@ -62,7 +68,7 @@ internal partial interface IVideoGroupInternal /// Place holder used in HTML Content replace control with the insight content string ReplacementKey { get; set; } /// List of videos will be shown to customers - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo[] Video { get; set; } + System.Collections.Generic.List Video { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroup.json.cs similarity index 88% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroup.json.cs index 9275c5b7aca2..21bc4dba837a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroup.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroup.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class VideoGroup partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new VideoGroup(json) : null; } @@ -110,8 +108,8 @@ internal VideoGroup(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Jso { return; } - {_video = If( json?.PropertyT("videos"), out var __jsonVideos) ? If( __jsonVideos as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.VideoGroupVideo.FromJson(__u) )) ))() : null : Video;} - {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)ReplacementKey;} + {_video = If( json?.PropertyT("videos"), out var __jsonVideos) ? If( __jsonVideos as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideo) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.VideoGroupVideo.FromJson(__u) )) ))() : null : _video;} + {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)_replacementKey;} AfterFromJson(json); } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroupVideo.PowerShell.cs similarity index 80% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroupVideo.PowerShell.cs index 154a1caec5ef..4cc6b20bb574 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroupVideo.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class VideoGroupVideo partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideo DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new VideoGroupVideo(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new VideoGroupVideo(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -128,17 +128,17 @@ internal VideoGroupVideo(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Src")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -153,11 +153,11 @@ internal VideoGroupVideo(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Src")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Src = (string) content.GetValueForProperty("Src",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Src, global::System.Convert.ToString); } if (content.Contains("Title")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Title = (string) content.GetValueForProperty("Title",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal)this).Title, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroupVideo.TypeConverter.cs similarity index 96% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroupVideo.TypeConverter.cs index 4aa62d9f599c..6ace6f6f949c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroupVideo.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroupVideo.cs similarity index 87% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroupVideo.cs index 21beb1efdd8c..6b2c08e50b1a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroupVideo.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// VideoGroup video detail public partial class VideoGroupVideo : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideoInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideo, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideoInternal { /// Backing field for property. @@ -41,6 +41,9 @@ public partial interface IVideoGroupVideo : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Link to the video", SerializedName = @"src", PossibleTypes = new [] { typeof(string) })] @@ -49,6 +52,9 @@ public partial interface IVideoGroupVideo : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Title of the video", SerializedName = @"title", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroupVideo.json.cs similarity index 93% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroupVideo.json.cs index 9eb1ce52c570..25c3ebb89fd6 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/VideoGroupVideo.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/VideoGroupVideo.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class VideoGroupVideo partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideo. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideo. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IVideoGroupVideo FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IVideoGroupVideo FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new VideoGroupVideo(json) : null; } @@ -102,8 +102,8 @@ internal VideoGroupVideo(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Jso { return; } - {_src = If( json?.PropertyT("src"), out var __jsonSrc) ? (string)__jsonSrc : (string)Src;} - {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)Title;} + {_src = If( json?.PropertyT("src"), out var __jsonSrc) ? (string)__jsonSrc : (string)_src;} + {_title = If( json?.PropertyT("title"), out var __jsonTitle) ? (string)__jsonTitle : (string)_title;} AfterFromJson(json); } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.PowerShell.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/WebResult.PowerShell.cs similarity index 76% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.PowerShell.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/WebResult.PowerShell.cs index b446e234fa72..e0d3902819ad 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.PowerShell.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/WebResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class WebResult partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new WebResult(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new WebResult(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Prev /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -128,17 +128,17 @@ internal WebResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResultInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResultInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("SearchResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).SearchResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult[]) content.GetValueForProperty("SearchResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).SearchResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SearchResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResultInternal)this).SearchResult = (System.Collections.Generic.List) content.GetValueForProperty("SearchResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResultInternal)this).SearchResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SearchResultTypeConverter.ConvertFrom)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -153,11 +153,11 @@ internal WebResult(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ReplacementKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).ReplacementKey, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResultInternal)this).ReplacementKey = (string) content.GetValueForProperty("ReplacementKey",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResultInternal)this).ReplacementKey, global::System.Convert.ToString); } if (content.Contains("SearchResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).SearchResult = (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult[]) content.GetValueForProperty("SearchResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal)this).SearchResult, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SearchResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResultInternal)this).SearchResult = (System.Collections.Generic.List) content.GetValueForProperty("SearchResult",((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResultInternal)this).SearchResult, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SearchResultTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/WebResult.TypeConverter.cs similarity index 97% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.TypeConverter.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/WebResult.TypeConverter.cs index 29c5aba5f6ca..d05c09369a94 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.TypeConverter.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/WebResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/WebResult.cs similarity index 72% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/WebResult.cs index 214fec0af9a5..6fccdb242413 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/WebResult.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; /// AzureKB web result public partial class WebResult : - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResultInternal + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResultInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class WebResult : public string ReplacementKey { get => this._replacementKey; set => this._replacementKey = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult[] _searchResult; + private System.Collections.Generic.List _searchResult; /// AzureKB search results [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Origin(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult[] SearchResult { get => this._searchResult; set => this._searchResult = value; } + public System.Collections.Generic.List SearchResult { get => this._searchResult; set => this._searchResult = value; } /// Creates an new instance. public WebResult() @@ -41,6 +41,9 @@ public partial interface IWebResult : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Place holder used in HTML Content replace control with the content", SerializedName = @"replacementKey", PossibleTypes = new [] { typeof(string) })] @@ -49,10 +52,13 @@ public partial interface IWebResult : [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"AzureKB search results", SerializedName = @"searchResults", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult) })] - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult[] SearchResult { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResult) })] + System.Collections.Generic.List SearchResult { get; set; } } /// AzureKB web result @@ -62,7 +68,7 @@ internal partial interface IWebResultInternal /// Place holder used in HTML Content replace control with the content string ReplacementKey { get; set; } /// AzureKB search results - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult[] SearchResult { get; set; } + System.Collections.Generic.List SearchResult { get; set; } } } \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.json.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/WebResult.json.cs similarity index 88% rename from generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.json.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/WebResult.json.cs index c83718717261..22a655930b1d 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/Api20240301Preview/WebResult.json.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Models/WebResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class WebResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IWebResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult. + public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IWebResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json ? new WebResult(json) : null; } @@ -110,8 +108,8 @@ internal WebResult(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.Json { return; } - {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)ReplacementKey;} - {_searchResult = If( json?.PropertyT("searchResults"), out var __jsonSearchResults) ? If( __jsonSearchResults as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISearchResult) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SearchResult.FromJson(__u) )) ))() : null : SearchResult;} + {_replacementKey = If( json?.PropertyT("replacementKey"), out var __jsonReplacementKey) ? (string)__jsonReplacementKey : (string)_replacementKey;} + {_searchResult = If( json?.PropertyT("searchResults"), out var __jsonSearchResults) ? If( __jsonSearchResults as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISearchResult) (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SearchResult.FromJson(__u) )) ))() : null : _searchResult;} AfterFromJson(json); } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/SelfHelp.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/SelfHelp.cs index 98fa30098beb..000ec7604fa2 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/SelfHelp.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/api/SelfHelp.cs @@ -25,10 +25,11 @@ public partial class SelfHelp /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 CheckNameAvailabilityPost(string scope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CheckNameAvailabilityPost(string scope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -52,11 +53,11 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.CheckNameAvailabilityPost_Call(request,onOk,onDefault,eventListener,sender); + await this.CheckNameAvailabilityPost_Call (request, onOk,onDefault,eventListener,sender); } } @@ -70,10 +71,11 @@ public partial class SelfHelp /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 CheckNameAvailabilityPostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CheckNameAvailabilityPostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -81,10 +83,10 @@ public partial class SelfHelp { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/checkNameAvailability$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/checkNameAvailability'"); + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help'"); } // replace URI parameters with values from identity @@ -107,15 +109,266 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.CheckNameAvailabilityPost_Call(request,onOk,onDefault,eventListener,sender); + await this.CheckNameAvailabilityPost_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// + /// This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions + /// + /// + /// The required parameters for availability check. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 CheckNameAvailabilityPostViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CheckNameAvailabilityPostWithResult_Call (request, eventListener,sender); + } + } + + /// + /// This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Json string supplied to the CheckNameAvailabilityPost 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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CheckNameAvailabilityPostViaJsonString(string scope, 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.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CheckNameAvailabilityPost_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Json string supplied to the CheckNameAvailabilityPost operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CheckNameAvailabilityPostViaJsonStringWithResult(string scope, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CheckNameAvailabilityPostWithResult_Call (request, eventListener,sender); + } + } + + /// + /// This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// The required parameters for availability check. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 CheckNameAvailabilityPostWithResult(string scope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CheckNameAvailabilityPostWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CheckNameAvailabilityPostWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.CheckNameAvailabilityResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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 @@ -125,7 +378,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CheckNameAvailabilityPost_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CheckNameAvailabilityPost_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -136,6 +389,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -143,13 +397,13 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.CheckNameAvailabilityResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.CheckNameAvailabilityResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -175,7 +429,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CheckNameAvailabilityPost_Validate(string scope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task CheckNameAvailabilityPost_Validate(string scope, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -186,7 +440,7 @@ public partial class SelfHelp } /// - /// Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics + /// update a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics /// are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and /// the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed /// via ‘additionalParameters’ as an input to Diagnostics API. @@ -200,10 +454,11 @@ public partial class SelfHelp /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 DiagnosticsCreate(string scope, string diagnosticsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiagnosticsCreate(string scope, string diagnosticsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -228,16 +483,16 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DiagnosticsCreate_Call(request,onOk,onDefault,eventListener,sender); + await this.DiagnosticsCreate_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics + /// update a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics /// are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and /// the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed /// via ‘additionalParameters’ as an input to Diagnostics API. @@ -249,10 +504,11 @@ public partial class SelfHelp /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 DiagnosticsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiagnosticsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -288,113 +544,470 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DiagnosticsCreate_Call(request,onOk,onDefault,eventListener,sender); + await this.DiagnosticsCreate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// update a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics + /// are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and + /// the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘additionalParameters’ as an input to Diagnostics API. + ///
+ /// + /// The required request body for this insightResource invocation. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DiagnosticsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiagnosticsCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { + // verify that Identity format is an exact match for uri - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/diagnostics/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}'"); + } - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var diagnosticsResourceName = _match.Groups["diagnosticsResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/diagnostics/" + + diagnosticsResourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // 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; + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DiagnosticsCreateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics + /// are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and + /// the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘additionalParameters’ as an input to Diagnostics API. + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Unique resource name for insight resources + /// Json string supplied to the DiagnosticsCreate 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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DiagnosticsCreateViaJsonString(string scope, string diagnosticsResourceName, 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.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/diagnostics/" + + global::System.Uri.EscapeDataString(diagnosticsResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DiagnosticsCreate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics + /// are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and + /// the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘additionalParameters’ as an input to Diagnostics API. + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Unique resource name for insight resources + /// Json string supplied to the DiagnosticsCreate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DiagnosticsCreateViaJsonStringWithResult(string scope, string diagnosticsResourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/diagnostics/" + + global::System.Uri.EscapeDataString(diagnosticsResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DiagnosticsCreateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics + /// are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and + /// the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘additionalParameters’ as an input to Diagnostics API. + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Unique resource name for insight resources + /// The required request body for this insightResource invocation. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 DiagnosticsCreateWithResult(string scope, string diagnosticsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/diagnostics/" + + global::System.Uri.EscapeDataString(diagnosticsResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DiagnosticsCreateWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DiagnosticsCreateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // 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.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); // drop the old response _response?.Dispose(); // make the polling call _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. break; - 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. + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.RestException(_response, await _result); + throw ex; } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException(_response); + else + { + throw new global::System.Exception($"[{code}] : {message}"); } } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DiagnosticsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // 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.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException(_response); + } + } // check for terminal status code if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) @@ -413,6 +1026,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -420,13 +1034,13 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -453,7 +1067,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DiagnosticsCreate_Validate(string scope, string diagnosticsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DiagnosticsCreate_Validate(string scope, string diagnosticsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -461,7 +1075,7 @@ public partial class SelfHelp await eventListener.AssertNotNull(nameof(diagnosticsResourceName),diagnosticsResourceName); await eventListener.AssertMinimumLength(nameof(diagnosticsResourceName),diagnosticsResourceName,1); await eventListener.AssertMaximumLength(nameof(diagnosticsResourceName),diagnosticsResourceName,100); - await eventListener.AssertRegEx(nameof(diagnosticsResourceName),diagnosticsResourceName,@"^[A-Za-z0-9-+@()_]+$"); + await eventListener.AssertRegEx(nameof(diagnosticsResourceName), diagnosticsResourceName, @"^[A-Za-z0-9-+@()_]+$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } @@ -481,7 +1095,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DiagnosticsGet(string scope, string diagnosticsResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiagnosticsGet(string scope, string diagnosticsResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -506,7 +1120,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DiagnosticsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.DiagnosticsGet_Call (request, onOk,onDefault,eventListener,sender); } } @@ -522,7 +1136,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DiagnosticsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiagnosticsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -558,21 +1172,172 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DiagnosticsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.DiagnosticsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. - /// + /// + /// Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DiagnosticsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/diagnostics/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var diagnosticsResourceName = _match.Groups["diagnosticsResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/diagnostics/" + + diagnosticsResourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DiagnosticsGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic. + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Unique resource name for insight resources + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DiagnosticsGetWithResult(string scope, string diagnosticsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/diagnostics/" + + global::System.Uri.EscapeDataString(diagnosticsResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DiagnosticsGetWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DiagnosticsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DiagnosticsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DiagnosticsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -583,6 +1348,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -590,13 +1356,13 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -630,7 +1396,7 @@ public partial class SelfHelp await eventListener.AssertNotNull(nameof(diagnosticsResourceName),diagnosticsResourceName); await eventListener.AssertMinimumLength(nameof(diagnosticsResourceName),diagnosticsResourceName,1); await eventListener.AssertMaximumLength(nameof(diagnosticsResourceName),diagnosticsResourceName,100); - await eventListener.AssertRegEx(nameof(diagnosticsResourceName),diagnosticsResourceName,@"^[A-Za-z0-9-+@()_]+$"); + await eventListener.AssertRegEx(nameof(diagnosticsResourceName), diagnosticsResourceName, @"^[A-Za-z0-9-+@()_]+$"); } } @@ -654,7 +1420,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DiscoverySolutionList(string Filter, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiscoverySolutionList(string Filter, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -680,7 +1446,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DiscoverySolutionList_Call(request,onOk,onDefault,eventListener,sender); + await this.DiscoverySolutionList_Call (request, onOk,onDefault,eventListener,sender); } } @@ -705,7 +1471,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DiscoverySolutionListViaIdentity(global::System.String viaIdentity, string Filter, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiscoverySolutionListViaIdentity(global::System.String viaIdentity, string Filter, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -740,11 +1506,177 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DiscoverySolutionList_Call(request,onOk,onDefault,eventListener,sender); + await this.DiscoverySolutionList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) + /// AND resourceUri or resourceType.
Discovery Solutions is the initial entry point within Help API, which identifies + /// relevant Azure diagnostics and solutions.

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

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ + /// as an input to Diagnostics and Solutions API. + ///
+ /// + /// 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' + /// and 'SolutionType' filters. The [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports + /// only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' + /// Skiptoken is only used if a previous operation returned a partial result. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DiscoverySolutionListViaIdentityWithResult(global::System.String viaIdentity, string Filter, string Skiptoken, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Help/discoverySolutions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help/discoverySolutions'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Help/discoverySolutions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + (Filter)) + + "&" + + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DiscoverySolutionListWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) + /// AND resourceUri or resourceType.
Discovery Solutions is the initial entry point within Help API, which identifies + /// relevant Azure diagnostics and solutions.

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

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ + /// as an input to Diagnostics and Solutions API. + ///
+ /// 'ProblemClassificationId' is a mandatory filter to get solutions ids. It also supports optional 'ResourceType' + /// and 'SolutionType' filters. The [$filter](https://learn.microsoft.com/en-us/odata/webapi/first-odata-api#filter) supports + /// only 'and', 'or' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' + /// Skiptoken is only used if a previous operation returned a partial result. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DiscoverySolutionListWithResult(string Filter, string Skiptoken, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Help/discoverySolutions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + (Filter)) + + "&" + + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DiscoverySolutionListWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DiscoverySolutionListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiscoveryResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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 @@ -754,7 +1686,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DiscoverySolutionList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DiscoverySolutionList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -765,6 +1697,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -772,13 +1705,13 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiscoveryResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -822,10 +1755,11 @@ public partial class SelfHelp /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 DiscoverySolutionNlpSubscriptionScopePost(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePost(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -849,11 +1783,11 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DiscoverySolutionNlpSubscriptionScopePost_Call(request,onOk,onDefault,eventListener,sender); + await this.DiscoverySolutionNlpSubscriptionScopePost_Call (request, onOk,onDefault,eventListener,sender); } } @@ -865,10 +1799,11 @@ public partial class SelfHelp /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 DiscoverySolutionNlpSubscriptionScopePostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -876,10 +1811,10 @@ public partial class SelfHelp { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Help/discoverSolutions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Help$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Help'"); } // replace URI parameters with values from identity @@ -902,97 +1837,119 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DiscoverySolutionNlpSubscriptionScopePost_Call(request,onOk,onDefault,eventListener,sender); + await this.DiscoverySolutionNlpSubscriptionScopePost_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). + /// Solution discovery using natural language processing. + /// + /// Request body for discovering solutions using NLP. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePost_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePostViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Help$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Help'"); } + + // 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.Help/discoverSolutions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DiscoverySolutionNlpSubscriptionScopePostWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. - /// + /// Solution discovery using natural language processing. /// The ID of the target subscription. The value must be an UUID. - /// Request body for discovering solutions using NLP. + /// Json string supplied to the DiscoverySolutionNlpSubscriptionScopePost 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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePost_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePostViaJsonString(string subscriptionId, 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.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Help/discoverSolutions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DiscoverySolutionNlpSubscriptionScopePost_Call (request, onOk,onDefault,eventListener,sender); } } /// Solution discovery using natural language processing. - /// Request body for discovering solutions using NLP. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// The ID of the target subscription. The value must be an UUID. + /// Json string supplied to the DiscoverySolutionNlpSubscriptionScopePost operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePost(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePostViaJsonStringWithResult(string subscriptionId, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -1000,79 +1957,137 @@ public partial class SelfHelp { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.Help/discoverSolutions" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Help/discoverSolutions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.DiscoverySolutionNlpTenantScopePost_Call(request,onOk,onDefault,eventListener,sender); + return await this.DiscoverySolutionNlpSubscriptionScopePostWithResult_Call (request, eventListener,sender); } } /// Solution discovery using natural language processing. - /// + /// The ID of the target subscription. The value must be an UUID. /// Request body for discovering solutions using NLP. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePostWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Help/discoverSolutions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help/discoverSolutions'"); - } - - // replace URI parameters with values from identity // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.Help/discoverSolutions" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Help/discoverSolutions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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).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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.DiscoverySolutionNlpTenantScopePost_Call(request,onOk,onDefault,eventListener,sender); + return await this.DiscoverySolutionNlpSubscriptionScopePostWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePostWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiscoveryNlpResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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 @@ -1082,7 +2097,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePost_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePost_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1093,6 +2108,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1100,13 +2116,13 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiscoveryNlpResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1122,33 +2138,38 @@ public partial class SelfHelp } /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. /// + /// The ID of the target subscription. The value must be an UUID. /// Request body for discovering solutions using NLP. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePost_Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpSubscriptionScopePost_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Returns list of operations. + /// Solution discovery using natural language processing. + /// Request body for discovering solutions using NLP. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePost(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -1156,7 +2177,7 @@ public partial class SelfHelp { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.Help/operations" + "/providers/Microsoft.Help/discoverSolutions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1165,26 +2186,32 @@ public partial class SelfHelp // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + await this.DiscoverySolutionNlpTenantScopePost_Call (request, onOk,onDefault,eventListener,sender); } } - /// Returns list of operations. + /// Solution discovery using natural language processing. /// + /// Request body for discovering solutions using NLP. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePostViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -1192,16 +2219,16 @@ public partial class SelfHelp { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Help/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Help$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help/operations'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help'"); } // replace URI parameters with values from identity // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.Help/operations" + "/providers/Microsoft.Help/discoverSolutions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1210,99 +2237,117 @@ public partial class SelfHelp // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + await this.DiscoverySolutionNlpTenantScopePost_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). + /// Solution discovery using natural language processing. + /// + /// Request body for discovering solutions using NLP. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePostViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Help$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help'"); } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Help/discoverSolutions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DiscoverySolutionNlpTenantScopePostWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// + /// Solution discovery using natural language processing. + /// Json string supplied to the DiscoverySolutionNlpTenantScopePost 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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePostViaJsonString(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.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Help/discoverSolutions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DiscoverySolutionNlpTenantScopePost_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ - /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might - /// fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions - /// response must be passed via ‘parameters’ in the request body of simplified Solutions API.
- ///
- /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read - /// - /// Simplified Solutions Resource Name. - /// The required request body for simplified Solutions resource creation. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Solution discovery using natural language processing. + /// Json string supplied to the DiscoverySolutionNlpTenantScopePost operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SimplifiedSolutionsCreate(string scope, string simplifiedSolutionsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePostViaJsonStringWithResult(global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -1310,102 +2355,78 @@ public partial class SelfHelp { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/" - + (scope) - + "/providers/Microsoft.Help/simplifiedSolutions/" - + global::System.Uri.EscapeDataString(simplifiedSolutionsResourceName) + "/providers/Microsoft.Help/discoverSolutions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.SimplifiedSolutionsCreate_Call(request,onOk,onDefault,eventListener,sender); + return await this.DiscoverySolutionNlpTenantScopePostWithResult_Call (request, eventListener,sender); } } - /// - /// Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ - /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might - /// fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions - /// response must be passed via ‘parameters’ in the request body of simplified Solutions API.
- ///
- /// - /// The required request body for simplified Solutions resource creation. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Solution discovery using natural language processing. + /// Request body for discovering solutions using NLP. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SimplifiedSolutionsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePostWithResult(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/simplifiedSolutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}'"); - } - - // replace URI parameters with values from identity - var scope = _match.Groups["scope"].Value; - var simplifiedSolutionsResourceName = _match.Groups["simplifiedSolutionsResourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/" - + scope - + "/providers/Microsoft.Help/simplifiedSolutions/" - + simplifiedSolutionsResourceName + "/providers/Microsoft.Help/discoverSolutions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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).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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.SimplifiedSolutionsCreate_Call(request,onOk,onDefault,eventListener,sender); + return await this.DiscoverySolutionNlpTenantScopePostWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SimplifiedSolutionsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePostWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1413,105 +2434,74 @@ public partial class SelfHelp try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiscoveryNlpResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.RestException(_response, await _result); + throw ex; } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException(_response); + else + { + throw new global::System.Exception($"[{code}] : {message}"); } } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePost_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1519,13 +2509,13 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiscoveryNlpResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1541,37 +2531,24 @@ public partial class SelfHelp } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// - /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read - /// - /// Simplified Solutions Resource Name. - /// The required request body for simplified Solutions resource creation. + /// Request body for discovering solutions using NLP. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SimplifiedSolutionsCreate_Validate(string scope, string simplifiedSolutionsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DiscoverySolutionNlpTenantScopePost_Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(scope),scope); - await eventListener.AssertNotNull(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName); - await eventListener.AssertMinimumLength(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,1); - await eventListener.AssertMaximumLength(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,100); - await eventListener.AssertRegEx(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,@"^[A-Za-z0-9-+@()_]+$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. - /// - /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read - /// - /// Simplified Solutions Resource Name. + /// Returns list of operations. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1580,7 +2557,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SimplifiedSolutionsGet(string scope, string simplifiedSolutionsResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -1588,10 +2565,7 @@ public partial class SelfHelp { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/" - + (scope) - + "/providers/Microsoft.Help/simplifiedSolutions/" - + global::System.Uri.EscapeDataString(simplifiedSolutionsResourceName) + "/providers/Microsoft.Help/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1605,13 +2579,11 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SimplifiedSolutionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. - /// + /// Returns list of operations. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -1621,7 +2593,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SimplifiedSolutionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -1629,21 +2601,16 @@ public partial class SelfHelp { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/simplifiedSolutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Help/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help/operations'"); } // replace URI parameters with values from identity - var scope = _match.Groups["scope"].Value; - var simplifiedSolutionsResourceName = _match.Groups["simplifiedSolutionsResourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/" - + scope - + "/providers/Microsoft.Help/simplifiedSolutions/" - + simplifiedSolutionsResourceName + "/providers/Microsoft.Help/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1657,52 +2624,1832 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SimplifiedSolutionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Returns list of operations. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SimplifiedSolutionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Help/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Help/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Returns list of operations. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Help/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + + } + } + + /// + /// update a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ + /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might + /// fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions + /// response must be passed via ‘parameters’ in the request body of simplified Solutions API.
+ ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Simplified Solutions Resource Name. + /// The required request body for simplified Solutions resource creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 SimplifiedSolutionsCreate(string scope, string simplifiedSolutionsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/simplifiedSolutions/" + + global::System.Uri.EscapeDataString(simplifiedSolutionsResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SimplifiedSolutionsCreate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ + /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might + /// fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions + /// response must be passed via ‘parameters’ in the request body of simplified Solutions API.
+ ///
+ /// + /// The required request body for simplified Solutions resource creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 SimplifiedSolutionsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/simplifiedSolutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var simplifiedSolutionsResourceName = _match.Groups["simplifiedSolutionsResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/simplifiedSolutions/" + + simplifiedSolutionsResourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SimplifiedSolutionsCreate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ + /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might + /// fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions + /// response must be passed via ‘parameters’ in the request body of simplified Solutions API.
+ ///
+ /// + /// The required request body for simplified Solutions resource creation. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 SimplifiedSolutionsCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/simplifiedSolutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var simplifiedSolutionsResourceName = _match.Groups["simplifiedSolutionsResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/simplifiedSolutions/" + + simplifiedSolutionsResourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SimplifiedSolutionsCreateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ + /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might + /// fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions + /// response must be passed via ‘parameters’ in the request body of simplified Solutions API.
+ ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Simplified Solutions Resource Name. + /// Json string supplied to the SimplifiedSolutionsCreate 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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SimplifiedSolutionsCreateViaJsonString(string scope, string simplifiedSolutionsResourceName, 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.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/simplifiedSolutions/" + + global::System.Uri.EscapeDataString(simplifiedSolutionsResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SimplifiedSolutionsCreate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ + /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might + /// fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions + /// response must be passed via ‘parameters’ in the request body of simplified Solutions API.
+ ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Simplified Solutions Resource Name. + /// Json string supplied to the SimplifiedSolutionsCreate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SimplifiedSolutionsCreateViaJsonStringWithResult(string scope, string simplifiedSolutionsResourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/simplifiedSolutions/" + + global::System.Uri.EscapeDataString(simplifiedSolutionsResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SimplifiedSolutionsCreateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ + /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might + /// fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions + /// response must be passed via ‘parameters’ in the request body of simplified Solutions API.
+ ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Simplified Solutions Resource Name. + /// The required request body for simplified Solutions resource creation. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 SimplifiedSolutionsCreateWithResult(string scope, string simplifiedSolutionsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/simplifiedSolutions/" + + global::System.Uri.EscapeDataString(simplifiedSolutionsResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SimplifiedSolutionsCreateWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SimplifiedSolutionsCreateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // 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.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SimplifiedSolutionsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + 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.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Simplified Solutions Resource Name. + /// The required request body for simplified Solutions resource creation. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SimplifiedSolutionsCreate_Validate(string scope, string simplifiedSolutionsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(scope),scope); + await eventListener.AssertNotNull(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName); + await eventListener.AssertMinimumLength(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,1); + await eventListener.AssertMaximumLength(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,100); + await eventListener.AssertRegEx(nameof(simplifiedSolutionsResourceName), simplifiedSolutionsResourceName, @"^[A-Za-z0-9-+@()_]+$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Simplified Solutions Resource Name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SimplifiedSolutionsGet(string scope, string simplifiedSolutionsResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/simplifiedSolutions/" + + global::System.Uri.EscapeDataString(simplifiedSolutionsResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SimplifiedSolutionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SimplifiedSolutionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/simplifiedSolutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var simplifiedSolutionsResourceName = _match.Groups["simplifiedSolutionsResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/simplifiedSolutions/" + + simplifiedSolutionsResourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SimplifiedSolutionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SimplifiedSolutionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/simplifiedSolutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var simplifiedSolutionsResourceName = _match.Groups["simplifiedSolutionsResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/simplifiedSolutions/" + + simplifiedSolutionsResourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SimplifiedSolutionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions. + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Simplified Solutions Resource Name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SimplifiedSolutionsGetWithResult(string scope, string simplifiedSolutionsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/simplifiedSolutions/" + + global::System.Uri.EscapeDataString(simplifiedSolutionsResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SimplifiedSolutionsGetWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SimplifiedSolutionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SimplifiedSolutionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Simplified Solutions Resource Name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SimplifiedSolutionsGet_Validate(string scope, string simplifiedSolutionsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(scope),scope); + await eventListener.AssertNotNull(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName); + await eventListener.AssertMinimumLength(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,1); + await eventListener.AssertMaximumLength(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,100); + await eventListener.AssertRegEx(nameof(simplifiedSolutionsResourceName), simplifiedSolutionsResourceName, @"^[A-Za-z0-9-+@()_]+$"); + } + } + + /// + /// create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from + /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully + /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) + /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional + /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. + /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. + /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. + /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might + /// see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the + /// same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response + /// is the same as ‘properties.parameters’ in the request for Troubleshooters + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// The required request body for this solution resource creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 SolutionCreate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/solutions/" + + global::System.Uri.EscapeDataString(solutionResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SolutionCreate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from + /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully + /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) + /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional + /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. + /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. + /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. + /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might + /// see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the + /// same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response + /// is the same as ‘properties.parameters’ in the request for Troubleshooters + ///
+ /// + /// The required request body for this solution resource creation. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 SolutionCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var solutionResourceName = _match.Groups["solutionResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/solutions/" + + solutionResourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SolutionCreate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from + /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully + /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) + /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional + /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. + /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. + /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. + /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might + /// see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the + /// same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response + /// is the same as ‘properties.parameters’ in the request for Troubleshooters + ///
+ /// + /// The required request body for this solution resource creation. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 SolutionCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var solutionResourceName = _match.Groups["solutionResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/solutions/" + + solutionResourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SolutionCreateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from + /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully + /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) + /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional + /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. + /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. + /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. + /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might + /// see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the + /// same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response + /// is the same as ‘properties.parameters’ in the request for Troubleshooters + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// Json string supplied to the SolutionCreate 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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SolutionCreateViaJsonString(string scope, string solutionResourceName, 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.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/solutions/" + + global::System.Uri.EscapeDataString(solutionResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SolutionCreate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from + /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully + /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) + /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional + /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. + /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. + /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. + /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might + /// see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the + /// same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response + /// is the same as ‘properties.parameters’ in the request for Troubleshooters + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// Json string supplied to the SolutionCreate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SolutionCreateViaJsonStringWithResult(string scope, string solutionResourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/solutions/" + + global::System.Uri.EscapeDataString(solutionResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SolutionCreateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from + /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully + /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) + /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional + /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. + /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. + /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. + /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might + /// see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the + /// same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response + /// is the same as ‘properties.parameters’ in the request for Troubleshooters + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// The required request body for this solution resource creation. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 SolutionCreateWithResult(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/solutions/" + + global::System.Uri.EscapeDataString(solutionResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SolutionCreateWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SolutionCreateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // 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.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SolutionCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // 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.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Finally, request, _response); _response?.Dispose(); request?.Dispose(); @@ -1711,46 +4458,37 @@ public partial class SelfHelp } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read /// - /// Simplified Solutions Resource Name. + /// Solution resource Name. + /// The required request body for this solution resource creation. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SimplifiedSolutionsGet_Validate(string scope, string simplifiedSolutionsResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SolutionCreate_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(scope),scope); - await eventListener.AssertNotNull(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName); - await eventListener.AssertMinimumLength(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,1); - await eventListener.AssertMaximumLength(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,100); - await eventListener.AssertRegEx(nameof(simplifiedSolutionsResourceName),simplifiedSolutionsResourceName,@"^[A-Za-z0-9-+@()_]+$"); + await eventListener.AssertNotNull(nameof(solutionResourceName),solutionResourceName); + await eventListener.AssertMinimumLength(nameof(solutionResourceName),solutionResourceName,1); + await eventListener.AssertMaximumLength(nameof(solutionResourceName),solutionResourceName,100); + await eventListener.AssertRegEx(nameof(solutionResourceName), solutionResourceName, @"^[A-Za-z0-9-+@()_]+$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } /// - /// Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from - /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully - /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) - /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional - /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. - /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. - /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. - /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might - /// see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed - /// via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the - /// same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response - /// is the same as ‘properties.parameters’ in the request for Troubleshooters + /// Get the solution using the applicable solutionResourceName while creating the solution. ///
/// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read /// /// Solution resource Name. - /// The required request body for this solution resource creation. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1759,7 +4497,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SolutionCreate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SolutionGet(string scope, string solutionResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -1779,35 +4517,19 @@ public partial class SelfHelp // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SolutionCreate_Call(request,onOk,onDefault,eventListener,sender); + await this.SolutionGet_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from - /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully - /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) - /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional - /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. - /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. - /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. - /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might - /// see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed - /// via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the - /// same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response - /// is the same as ‘properties.parameters’ in the request for Troubleshooters + /// Get the solution using the applicable solutionResourceName while creating the solution. ///
/// - /// The required request body for this solution resource creation. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1816,7 +4538,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SolutionCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SolutionGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -1847,136 +4569,188 @@ public partial class SelfHelp // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SolutionCreate_Call(request,onOk,onDefault,eventListener,sender); + await this.SolutionGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// Get the solution using the applicable solutionResourceName while creating the solution. + /// + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SolutionCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SolutionGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - 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("^/(?[^/]+)/providers/Microsoft.Help/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var solutionResourceName = _match.Groups["solutionResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/solutions/" + + solutionResourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SolutionGetWithResult_Call (request, eventListener,sender); + } + } - // 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; + /// + /// Get the solution using the applicable solutionResourceName while creating the solution. + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SolutionGetWithResult(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/solutions/" + + global::System.Uri.EscapeDataString(solutionResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // drop the old response - _response?.Dispose(); + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SolutionGetWithResult_Call (request, eventListener,sender); + } + } - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException(_response); - } - } + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SolutionGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SolutionGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1984,13 +4758,13 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2006,18 +4780,17 @@ public partial class SelfHelp } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. /// /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read /// /// Solution resource Name. - /// The required request body for this solution resource creation. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SolutionCreate_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SolutionGet_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2025,18 +4798,16 @@ public partial class SelfHelp await eventListener.AssertNotNull(nameof(solutionResourceName),solutionResourceName); await eventListener.AssertMinimumLength(nameof(solutionResourceName),solutionResourceName,1); await eventListener.AssertMaximumLength(nameof(solutionResourceName),solutionResourceName,100); - await eventListener.AssertRegEx(nameof(solutionResourceName),solutionResourceName,@"^[A-Za-z0-9-+@()_]+$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertRegEx(nameof(solutionResourceName), solutionResourceName, @"^[A-Za-z0-9-+@()_]+$"); } } /// - /// Get the solution using the applicable solutionResourceName while creating the solution. + /// Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot + /// their issues. /// - /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read - /// - /// Solution resource Name. + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the + /// Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -2045,7 +4816,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SolutionGet(string scope, string solutionResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SolutionSelfHelpGet(string solutionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -2053,10 +4824,8 @@ public partial class SelfHelp { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/" - + (scope) - + "/providers/Microsoft.Help/solutions/" - + global::System.Uri.EscapeDataString(solutionResourceName) + "/providers/Microsoft.Help/selfHelp/" + + global::System.Uri.EscapeDataString(solutionId) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2070,12 +4839,13 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SolutionGet_Call(request,onOk,onDefault,eventListener,sender); + await this.SolutionSelfHelpGet_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Get the solution using the applicable solutionResourceName while creating the solution. + /// Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot + /// their issues. /// /// /// a delegate that is called when the remote service returns 200 (OK). @@ -2086,7 +4856,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SolutionGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SolutionSelfHelpGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -2094,21 +4864,18 @@ public partial class SelfHelp { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Help/selfHelp/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help/selfHelp/{solutionId}'"); } // replace URI parameters with values from identity - var scope = _match.Groups["scope"].Value; - var solutionResourceName = _match.Groups["solutionResourceName"].Value; + var solutionId = _match.Groups["solutionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/" - + scope - + "/providers/Microsoft.Help/solutions/" - + solutionResourceName + "/providers/Microsoft.Help/selfHelp/" + + solutionId + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2122,11 +4889,158 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SolutionGet_Call(request,onOk,onDefault,eventListener,sender); + await this.SolutionSelfHelpGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot + /// their issues. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SolutionSelfHelpGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Help/selfHelp/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help/selfHelp/{solutionId}'"); + } + + // replace URI parameters with values from identity + var solutionId = _match.Groups["solutionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Help/selfHelp/" + + solutionId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SolutionSelfHelpGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot + /// their issues. + /// + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the + /// Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SolutionSelfHelpGetWithResult(string solutionId, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Help/selfHelp/" + + global::System.Uri.EscapeDataString(solutionId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SolutionSelfHelpGetWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SolutionSelfHelpGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourceSelfHelp.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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 @@ -2136,7 +5050,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SolutionGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SolutionSelfHelpGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2147,6 +5061,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2154,13 +5069,13 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResourceSelfHelp.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2176,43 +5091,42 @@ public partial class SelfHelp } /// - /// Validation method for method. Call this like the actual call, but you will get validation events - /// back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// - /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read - /// - /// Solution resource Name. + /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the + /// Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SolutionGet_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SolutionSelfHelpGet_Validate(string solutionId, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(scope),scope); - await eventListener.AssertNotNull(nameof(solutionResourceName),solutionResourceName); - await eventListener.AssertMinimumLength(nameof(solutionResourceName),solutionResourceName,1); - await eventListener.AssertMaximumLength(nameof(solutionResourceName),solutionResourceName,100); - await eventListener.AssertRegEx(nameof(solutionResourceName),solutionResourceName,@"^[A-Za-z0-9-+@()_]+$"); + await eventListener.AssertNotNull(nameof(solutionId),solutionId); + await eventListener.AssertMinimumLength(nameof(solutionId),solutionId,1); + await eventListener.AssertMaximumLength(nameof(solutionId),solutionId,100); } } /// - /// Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot - /// their issues. + /// update the requiredInputs or additional information needed to execute the solution /// - /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the - /// Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// The required request body for updating a solution resource. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 SolutionSelfHelpGet(string solutionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SolutionUpdate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -2220,8 +5134,10 @@ public partial class SelfHelp { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.Help/selfHelp/" - + global::System.Uri.EscapeDataString(solutionId) + "/" + + (scope) + + "/providers/Microsoft.Help/solutions/" + + global::System.Uri.EscapeDataString(solutionResourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2230,29 +5146,34 @@ public partial class SelfHelp // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SolutionSelfHelpGet_Call(request,onOk,onDefault,eventListener,sender); + await this.SolutionUpdate_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot - /// their issues. + /// update the requiredInputs or additional information needed to execute the solution /// /// + /// The required request body for updating a solution resource. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 SolutionSelfHelpGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SolutionUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -2260,18 +5181,21 @@ public partial class SelfHelp { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Help/selfHelp/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Help/selfHelp/{solutionId}'"); + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); } // replace URI parameters with values from identity - var solutionId = _match.Groups["solutionId"].Value; + var scope = _match.Groups["scope"].Value; + var solutionResourceName = _match.Groups["solutionResourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.Help/selfHelp/" - + solutionId + "/" + + scope + + "/providers/Microsoft.Help/solutions/" + + solutionResourceName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2279,92 +5203,83 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.SolutionSelfHelpGet_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task SolutionSelfHelpGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResourceSelfHelp.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SolutionUpdate_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// update the requiredInputs or additional information needed to execute the solution /// - /// SolutionId is a unique id to identify a solution. You can retrieve the solution id using the - /// Discovery api - https://learn.microsoft.com/en-us/rest/api/help/discovery-solution/list?view=rest-help-2023-09-01-preview&tabs=HTTP + /// + /// The required request body for updating a solution resource. /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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. + /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SolutionSelfHelpGet_Validate(string solutionId, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task SolutionUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(solutionId),solutionId); - await eventListener.AssertMinimumLength(nameof(solutionId),solutionId,1); - await eventListener.AssertMaximumLength(nameof(solutionId),solutionId,100); + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var solutionResourceName = _match.Groups["solutionResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/solutions/" + + solutionResourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SolutionUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Update the requiredInputs or additional information needed to execute the solution + /// update the requiredInputs or additional information needed to execute the solution /// /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read /// /// Solution resource Name. - /// The required request body for updating a solution resource. + /// Json string supplied to the SolutionUpdate 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). @@ -2373,7 +5288,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SolutionUpdate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SolutionUpdateViaJsonString(string scope, string solutionResourceName, 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.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -2398,72 +5313,260 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SolutionUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.SolutionUpdate_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Update the requiredInputs or additional information needed to execute the solution + /// update the requiredInputs or additional information needed to execute the solution /// - /// - /// The required request body for updating a solution resource. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// Json string supplied to the SolutionUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SolutionUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SolutionUpdateViaJsonStringWithResult(string scope, string solutionResourceName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/solutions/" + + global::System.Uri.EscapeDataString(solutionResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // replace URI parameters with values from identity - var scope = _match.Groups["scope"].Value; - var solutionResourceName = _match.Groups["solutionResourceName"].Value; + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SolutionUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update the requiredInputs or additional information needed to execute the solution + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// The required request body for updating a solution resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 SolutionUpdateWithResult(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/" - + scope + + (scope) + "/providers/Microsoft.Help/solutions/" - + solutionResourceName + + global::System.Uri.EscapeDataString(solutionResourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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).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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.SolutionUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.SolutionUpdateWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SolutionUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // 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.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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 @@ -2473,31 +5576,28 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SolutionUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SolutionUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { + // 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.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: azure-async-operation var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + 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.SelfHelp.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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"))) { @@ -2506,15 +5606,14 @@ public partial class SelfHelp 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.SelfHelp.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener var content = await _response.Content.ReadAsStringAsync(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); @@ -2523,45 +5622,45 @@ public partial class SelfHelp _response = await sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException(_response); - } - } + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException(_response); + } + } // check for terminal status code if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) @@ -2580,6 +5679,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2587,13 +5687,13 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2620,7 +5720,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SolutionUpdate_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SolutionUpdate_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2628,7 +5728,7 @@ public partial class SelfHelp await eventListener.AssertNotNull(nameof(solutionResourceName),solutionResourceName); await eventListener.AssertMinimumLength(nameof(solutionResourceName),solutionResourceName,1); await eventListener.AssertMaximumLength(nameof(solutionResourceName),solutionResourceName,100); - await eventListener.AssertRegEx(nameof(solutionResourceName),solutionResourceName,@"^[A-Za-z0-9-+@()_]+$"); + await eventListener.AssertRegEx(nameof(solutionResourceName), solutionResourceName, @"^[A-Za-z0-9-+@()_]+$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } @@ -2646,10 +5746,11 @@ public partial class SelfHelp /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 SolutionWarmUp(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody body, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SolutionWarmUp(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody body, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -2675,11 +5776,11 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SolutionWarmUp_Call(request,onNoContent,onDefault,eventListener,sender); + await this.SolutionWarmUp_Call (request, onNoContent,onDefault,eventListener,sender); } } @@ -2693,10 +5794,11 @@ public partial class SelfHelp /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 SolutionWarmUpViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody body, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SolutionWarmUpViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody body, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -2704,10 +5806,10 @@ public partial class SelfHelp { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/solutions/(?[^/]+)/warmup$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/solutions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup'"); + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}'"); } // replace URI parameters with values from identity @@ -2733,15 +5835,64 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SolutionWarmUp_Call (request, onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Warm up the solution resource by preloading asynchronous diagnostics results into cache + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Solution resource Name. + /// Json string supplied to the SolutionWarmUp operation + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SolutionWarmUpViaJsonString(string scope, string solutionResourceName, global::System.String jsonString, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/solutions/" + + global::System.Uri.EscapeDataString(solutionResourceName) + + "/warmup" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SolutionWarmUp_Call(request,onNoContent,onDefault,eventListener,sender); + await this.SolutionWarmUp_Call (request, onNoContent,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 default (any response code not handled @@ -2751,7 +5902,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SolutionWarmUp_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SolutionWarmUp_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2762,6 +5913,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2775,7 +5927,7 @@ public partial class SelfHelp default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2802,7 +5954,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SolutionWarmUp_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SolutionWarmUp_Validate(string scope, string solutionResourceName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2810,7 +5962,7 @@ public partial class SelfHelp await eventListener.AssertNotNull(nameof(solutionResourceName),solutionResourceName); await eventListener.AssertMinimumLength(nameof(solutionResourceName),solutionResourceName,1); await eventListener.AssertMaximumLength(nameof(solutionResourceName),solutionResourceName,100); - await eventListener.AssertRegEx(nameof(solutionResourceName),solutionResourceName,@"^[A-Za-z0-9-+@()_]+$"); + await eventListener.AssertRegEx(nameof(solutionResourceName), solutionResourceName, @"^[A-Za-z0-9-+@()_]+$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } @@ -2819,7 +5971,7 @@ public partial class SelfHelp /// /// Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource /// name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the - /// next step in the process. This API is used after the Troubleshooter has been created using the Create API. + /// next step in the process. This API is used after the Troubleshooter has been created using the continue API. ///
/// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read /// @@ -2830,10 +5982,11 @@ public partial class SelfHelp /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 TroubleshootersContinue(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TroubleshootersContinue(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -2859,18 +6012,18 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TroubleshootersContinue_Call(request,onNoContent,onDefault,eventListener,sender); + await this.TroubleshootersContinue_Call (request, onNoContent,onDefault,eventListener,sender); } } /// /// Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource /// name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the - /// next step in the process. This API is used after the Troubleshooter has been created using the Create API. + /// next step in the process. This API is used after the Troubleshooter has been created using the continue API. ///
/// /// The required request body for going to next step in Troubleshooter resource. @@ -2879,10 +6032,11 @@ public partial class SelfHelp /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 TroubleshootersContinueViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TroubleshootersContinueViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody body, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -2890,10 +6044,10 @@ public partial class SelfHelp { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/troubleshooters/(?[^/]+)/continue$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/troubleshooters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue'"); + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}'"); } // replace URI parameters with values from identity @@ -2919,15 +6073,66 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TroubleshootersContinue_Call (request, onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource + /// name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the + /// next step in the process. This API is used after the Troubleshooter has been created using the continue API. + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Troubleshooter resource Name. + /// Json string supplied to the TroubleshootersContinue operation + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TroubleshootersContinueViaJsonString(string scope, string troubleshooterName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/troubleshooters/" + + global::System.Uri.EscapeDataString(troubleshooterName) + + "/continue" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TroubleshootersContinue_Call(request,onNoContent,onDefault,eventListener,sender); + await this.TroubleshootersContinue_Call (request, onNoContent,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 default (any response code not handled @@ -2937,7 +6142,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TroubleshootersContinue_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TroubleshootersContinue_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2948,6 +6153,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2955,13 +6161,13 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.NoContent: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\cloudtest\.autorest\@autorest_powershell@3.0.518\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onNoContent(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\cloudtest\.autorest\@autorest_powershell@4.0.739\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2988,7 +6194,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TroubleshootersContinue_Validate(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TroubleshootersContinue_Validate(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2996,14 +6202,14 @@ public partial class SelfHelp await eventListener.AssertNotNull(nameof(troubleshooterName),troubleshooterName); await eventListener.AssertMinimumLength(nameof(troubleshooterName),troubleshooterName,1); await eventListener.AssertMaximumLength(nameof(troubleshooterName),troubleshooterName,100); - await eventListener.AssertRegEx(nameof(troubleshooterName),troubleshooterName,@"([A-Za-z0-9]+(-[A-Za-z0-9]+)+)"); + await eventListener.AssertRegEx(nameof(troubleshooterName), troubleshooterName, @"([A-Za-z0-9]+(-[A-Za-z0-9]+)+)"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } /// - /// Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ + /// update the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ /// as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed /// problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow /// represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows @@ -3021,10 +6227,11 @@ public partial class SelfHelp /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 TroubleshootersCreate(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TroubleshootersCreate(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -3049,16 +6256,16 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TroubleshootersCreate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.TroubleshootersCreate_Call (request, onOk,onCreated,onDefault,eventListener,sender); } } /// - /// Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ + /// update the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ /// as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed /// problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow /// represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows @@ -3074,10 +6281,73 @@ public partial class SelfHelp /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// 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 TroubleshootersCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TroubleshootersCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/troubleshooters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var troubleshooterName = _match.Groups["troubleshooterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/troubleshooters/" + + troubleshooterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TroubleshootersCreate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// + /// update the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ + /// as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed + /// problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow + /// represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows + /// are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous + /// support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend + /// signals and customer manual selections. + ///
+ /// + /// The required request body for this Troubleshooter resource creation. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 TroubleshootersCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -3104,6 +6374,61 @@ public partial class SelfHelp + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TroubleshootersCreateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ + /// as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed + /// problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow + /// represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows + /// are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous + /// support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend + /// signals and customer manual selections. + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Troubleshooter resource Name. + /// Json string supplied to the TroubleshootersCreate 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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TroubleshootersCreateViaJsonString(string scope, string troubleshooterName, 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.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/troubleshooters/" + + global::System.Uri.EscapeDataString(troubleshooterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object @@ -3113,15 +6438,186 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content = 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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TroubleshootersCreate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.TroubleshootersCreate_Call (request, onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// + /// update the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ + /// as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed + /// problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow + /// represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows + /// are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous + /// support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend + /// signals and customer manual selections. + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Troubleshooter resource Name. + /// Json string supplied to the TroubleshootersCreate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TroubleshootersCreateViaJsonStringWithResult(string scope, string troubleshooterName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/troubleshooters/" + + global::System.Uri.EscapeDataString(troubleshooterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TroubleshootersCreateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ + /// as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed + /// problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow + /// represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows + /// are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous + /// support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend + /// signals and customer manual selections. + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Troubleshooter resource Name. + /// The required request body for this Troubleshooter resource creation. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 TroubleshootersCreateWithResult(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/troubleshooters/" + + global::System.Uri.EscapeDataString(troubleshooterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TroubleshootersCreateWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TroubleshootersCreateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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 201 (Created). @@ -3132,7 +6628,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TroubleshootersCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TroubleshootersCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3143,6 +6639,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3150,19 +6647,19 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } case global::System.Net.HttpStatusCode.Created: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3189,7 +6686,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TroubleshootersCreate_Validate(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TroubleshootersCreate_Validate(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource body, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3197,7 +6694,7 @@ public partial class SelfHelp await eventListener.AssertNotNull(nameof(troubleshooterName),troubleshooterName); await eventListener.AssertMinimumLength(nameof(troubleshooterName),troubleshooterName,1); await eventListener.AssertMaximumLength(nameof(troubleshooterName),troubleshooterName,100); - await eventListener.AssertRegEx(nameof(troubleshooterName),troubleshooterName,@"([A-Za-z0-9]+(-[A-Za-z0-9]+)+)"); + await eventListener.AssertRegEx(nameof(troubleshooterName), troubleshooterName, @"([A-Za-z0-9]+(-[A-Za-z0-9]+)+)"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } @@ -3215,7 +6712,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersEnd(string scope, string troubleshooterName, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TroubleshootersEnd(string scope, string troubleshooterName, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -3241,7 +6738,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TroubleshootersEnd_Call(request,onNoContent,onDefault,eventListener,sender); + await this.TroubleshootersEnd_Call (request, onNoContent,onDefault,eventListener,sender); } } @@ -3255,7 +6752,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersEndViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TroubleshootersEndViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -3263,10 +6760,10 @@ public partial class SelfHelp { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/troubleshooters/(?[^/]+)/end$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/troubleshooters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/end'"); + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}'"); } // replace URI parameters with values from identity @@ -3292,11 +6789,11 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TroubleshootersEnd_Call(request,onNoContent,onDefault,eventListener,sender); + await this.TroubleshootersEnd_Call (request, onNoContent,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 default (any response code not handled @@ -3306,7 +6803,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TroubleshootersEnd_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TroubleshootersEnd_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3317,6 +6814,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3324,13 +6822,13 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.NoContent: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\cloudtest\.autorest\@autorest_powershell@3.0.518\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onNoContent(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\cloudtest\.autorest\@autorest_powershell@4.0.739\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3364,7 +6862,7 @@ public partial class SelfHelp await eventListener.AssertNotNull(nameof(troubleshooterName),troubleshooterName); await eventListener.AssertMinimumLength(nameof(troubleshooterName),troubleshooterName,1); await eventListener.AssertMaximumLength(nameof(troubleshooterName),troubleshooterName,100); - await eventListener.AssertRegEx(nameof(troubleshooterName),troubleshooterName,@"([A-Za-z0-9]+(-[A-Za-z0-9]+)+)"); + await eventListener.AssertRegEx(nameof(troubleshooterName), troubleshooterName, @"([A-Za-z0-9]+(-[A-Za-z0-9]+)+)"); } } @@ -3372,7 +6870,7 @@ public partial class SelfHelp /// Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is /// being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and /// result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created - /// using the Create API. + /// using the get API. ///
/// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read /// @@ -3385,7 +6883,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersGet(string scope, string troubleshooterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TroubleshootersGet(string scope, string troubleshooterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -3410,7 +6908,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TroubleshootersGet_Call(request,onOk,onDefault,eventListener,sender); + await this.TroubleshootersGet_Call (request, onOk,onDefault,eventListener,sender); } } @@ -3418,7 +6916,7 @@ public partial class SelfHelp /// Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is /// being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and /// result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created - /// using the Create API. + /// using the get API. ///
/// /// a delegate that is called when the remote service returns 200 (OK). @@ -3429,7 +6927,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TroubleshootersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -3465,11 +6963,168 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TroubleshootersGet_Call(request,onOk,onDefault,eventListener,sender); + await this.TroubleshootersGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is + /// being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and + /// result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created + /// using the get API. + ///
+ /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TroubleshootersGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/troubleshooters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var troubleshooterName = _match.Groups["troubleshooterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/troubleshooters/" + + troubleshooterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TroubleshootersGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is + /// being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and + /// result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created + /// using the get API. + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Troubleshooter resource Name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TroubleshootersGetWithResult(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/troubleshooters/" + + global::System.Uri.EscapeDataString(troubleshooterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TroubleshootersGetWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TroubleshootersGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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 @@ -3479,7 +7134,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TroubleshootersGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TroubleshootersGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3490,6 +7145,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3497,13 +7153,13 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3537,7 +7193,7 @@ public partial class SelfHelp await eventListener.AssertNotNull(nameof(troubleshooterName),troubleshooterName); await eventListener.AssertMinimumLength(nameof(troubleshooterName),troubleshooterName,1); await eventListener.AssertMaximumLength(nameof(troubleshooterName),troubleshooterName,100); - await eventListener.AssertRegEx(nameof(troubleshooterName),troubleshooterName,@"([A-Za-z0-9]+(-[A-Za-z0-9]+)+)"); + await eventListener.AssertRegEx(nameof(troubleshooterName), troubleshooterName, @"([A-Za-z0-9]+(-[A-Za-z0-9]+)+)"); } } @@ -3556,7 +7212,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersRestart(string scope, string troubleshooterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TroubleshootersRestart(string scope, string troubleshooterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -3582,7 +7238,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TroubleshootersRestart_Call(request,onOk,onDefault,eventListener,sender); + await this.TroubleshootersRestart_Call (request, onOk,onDefault,eventListener,sender); } } @@ -3599,7 +7255,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task TroubleshootersRestartViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TroubleshootersRestartViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { var apiVersion = @"2024-03-01-preview"; // Constant Parameters @@ -3607,10 +7263,10 @@ public partial class SelfHelp { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/troubleshooters/(?[^/]+)/restart$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/troubleshooters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/restart'"); + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}'"); } // replace URI parameters with values from identity @@ -3636,11 +7292,166 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TroubleshootersRestart_Call(request,onOk,onDefault,eventListener,sender); + await this.TroubleshootersRestart_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Restarts the troubleshooter API using applicable troubleshooter resource name as the input.
It returns new resource + /// name which should be used in subsequent request. The old resource name is obsolete after this API is invoked. + ///
+ /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TroubleshootersRestartViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.Help/troubleshooters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}'"); + } + + // replace URI parameters with values from identity + var scope = _match.Groups["scope"].Value; + var troubleshooterName = _match.Groups["troubleshooterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + scope + + "/providers/Microsoft.Help/troubleshooters/" + + troubleshooterName + + "/restart" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TroubleshootersRestartWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Restarts the troubleshooter API using applicable troubleshooter resource name as the input.
It returns new resource + /// name which should be used in subsequent request. The old resource name is obsolete after this API is invoked. + ///
+ /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + /// + /// Troubleshooter resource Name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task TroubleshootersRestartWithResult(string scope, string troubleshooterName, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.Help/troubleshooters/" + + global::System.Uri.EscapeDataString(troubleshooterName) + + "/restart" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return 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.SelfHelp.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TroubleshootersRestartWithResult_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.SelfHelp.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task TroubleshootersRestartWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.RestartTroubleshooterResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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 @@ -3650,7 +7461,7 @@ public partial class SelfHelp /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TroubleshootersRestart_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TroubleshootersRestart_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3661,6 +7472,7 @@ public partial class SelfHelp await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3668,13 +7480,13 @@ public partial class SelfHelp case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.RestartTroubleshooterResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.RestartTroubleshooterResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3708,7 +7520,7 @@ public partial class SelfHelp await eventListener.AssertNotNull(nameof(troubleshooterName),troubleshooterName); await eventListener.AssertMinimumLength(nameof(troubleshooterName),troubleshooterName,1); await eventListener.AssertMaximumLength(nameof(troubleshooterName),troubleshooterName,100); - await eventListener.AssertRegEx(nameof(troubleshooterName),troubleshooterName,@"([A-Za-z0-9]+(-[A-Za-z0-9]+)+)"); + await eventListener.AssertRegEx(nameof(troubleshooterName), troubleshooterName, @"([A-Za-z0-9]+(-[A-Za-z0-9]+)+)"); } } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ActionType.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ActionType.Completer.cs deleted file mode 100644 index 579c5dbdc4bd..000000000000 --- a/generated/SelfHelp/SelfHelp.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.SelfHelp.Support -{ - - /// - /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/ActionType.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ActionType.TypeConverter.cs deleted file mode 100644 index a3120da5a001..000000000000 --- a/generated/SelfHelp/SelfHelp.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.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/ActionType.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ActionType.cs deleted file mode 100644 index d9485c4283cb..000000000000 --- a/generated/SelfHelp/SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Support.ActionType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Support.ActionType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ActionType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AggregationType.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AggregationType.Completer.cs deleted file mode 100644 index b8e7dd77c80f..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AggregationType.Completer.cs +++ /dev/null @@ -1,51 +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.SelfHelp.Support -{ - - /// Allowed values are Sum, Avg, Count, Min, Max. Default is Sum - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationTypeTypeConverter))] - public partial struct AggregationType : - 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) || "Sum".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Sum'", "Sum", global::System.Management.Automation.CompletionResultType.ParameterValue, "Sum"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Avg".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Avg'", "Avg", global::System.Management.Automation.CompletionResultType.ParameterValue, "Avg"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Count".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Count'", "Count", global::System.Management.Automation.CompletionResultType.ParameterValue, "Count"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Min".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Min'", "Min", global::System.Management.Automation.CompletionResultType.ParameterValue, "Min"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Max".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Max'", "Max", global::System.Management.Automation.CompletionResultType.ParameterValue, "Max"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AggregationType.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AggregationType.TypeConverter.cs deleted file mode 100644 index dd4a5dce1bed..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AggregationType.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.SelfHelp.Support -{ - - /// Allowed values are Sum, Avg, Count, Min, Max. Default is Sum - public partial class AggregationTypeTypeConverter : - 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) => AggregationType.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/AggregationType.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AggregationType.cs deleted file mode 100644 index a81abb82af4c..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AggregationType.cs +++ /dev/null @@ -1,104 +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.SelfHelp.Support -{ - - /// Allowed values are Sum, Avg, Count, Min, Max. Default is Sum - public partial struct AggregationType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType Avg = @"Avg"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType Count = @"Count"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType Max = @"Max"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType Min = @"Min"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType Sum = @"Sum"; - - /// 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 AggregationType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to AggregationType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new AggregationType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type AggregationType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type AggregationType (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 AggregationType && Equals((AggregationType)obj); - } - - /// Returns hashCode for enum AggregationType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for AggregationType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to AggregationType - /// the value to convert to an instance of . - - public static implicit operator AggregationType(string value) - { - return new AggregationType(value); - } - - /// Implicit operator to convert AggregationType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType e) - { - return e._value; - } - - /// Overriding != operator for enum AggregationType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum AggregationType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AggregationType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AutomatedCheckResultType.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AutomatedCheckResultType.Completer.cs deleted file mode 100644 index 7a0d26f0b296..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AutomatedCheckResultType.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.SelfHelp.Support -{ - - /// Type of Result. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultTypeTypeConverter))] - public partial struct AutomatedCheckResultType : - 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) || "Success".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Success'", "Success", global::System.Management.Automation.CompletionResultType.ParameterValue, "Success"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Warning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Warning'", "Warning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Warning"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Error".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Error'", "Error", global::System.Management.Automation.CompletionResultType.ParameterValue, "Error"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Information".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Information'", "Information", global::System.Management.Automation.CompletionResultType.ParameterValue, "Information"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AutomatedCheckResultType.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AutomatedCheckResultType.TypeConverter.cs deleted file mode 100644 index ce311977db76..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AutomatedCheckResultType.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.SelfHelp.Support -{ - - /// Type of Result. - public partial class AutomatedCheckResultTypeTypeConverter : - 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) => AutomatedCheckResultType.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/AutomatedCheckResultType.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AutomatedCheckResultType.cs deleted file mode 100644 index 56f17de89ba7..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/AutomatedCheckResultType.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.SelfHelp.Support -{ - - /// Type of Result. - public partial struct AutomatedCheckResultType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType Error = @"Error"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType Information = @"Information"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType Success = @"Success"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType Warning = @"Warning"; - - /// 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 AutomatedCheckResultType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to AutomatedCheckResultType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new AutomatedCheckResultType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type AutomatedCheckResultType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type AutomatedCheckResultType (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 AutomatedCheckResultType && Equals((AutomatedCheckResultType)obj); - } - - /// Returns hashCode for enum AutomatedCheckResultType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for AutomatedCheckResultType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to AutomatedCheckResultType - /// the value to convert to an instance of . - - public static implicit operator AutomatedCheckResultType(string value) - { - return new AutomatedCheckResultType(value); - } - - /// Implicit operator to convert AutomatedCheckResultType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType e) - { - return e._value; - } - - /// Overriding != operator for enum AutomatedCheckResultType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum AutomatedCheckResultType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.AutomatedCheckResultType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Confidence.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Confidence.Completer.cs deleted file mode 100644 index 75d30aa1bc0c..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Confidence.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.SelfHelp.Support -{ - - /// Confidence of the search result. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ConfidenceTypeConverter))] - public partial struct Confidence : - 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) || "Low".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Low'", "Low", global::System.Management.Automation.CompletionResultType.ParameterValue, "Low"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Medium".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Medium'", "Medium", global::System.Management.Automation.CompletionResultType.ParameterValue, "Medium"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "High".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'High'", "High", global::System.Management.Automation.CompletionResultType.ParameterValue, "High"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Confidence.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Confidence.TypeConverter.cs deleted file mode 100644 index e526426bdc6d..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Confidence.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.SelfHelp.Support -{ - - /// Confidence of the search result. - public partial class ConfidenceTypeConverter : - 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) => Confidence.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/Confidence.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Confidence.cs deleted file mode 100644 index 761b71dae5b5..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Confidence.cs +++ /dev/null @@ -1,100 +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.SelfHelp.Support -{ - - /// Confidence of the search result. - public partial struct Confidence : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence High = @"High"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence Low = @"Low"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence Medium = @"Medium"; - - /// 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 Confidence(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to Confidence - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new Confidence(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type Confidence - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type Confidence (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 Confidence && Equals((Confidence)obj); - } - - /// Returns hashCode for enum Confidence - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for Confidence - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to Confidence - /// the value to convert to an instance of . - - public static implicit operator Confidence(string value) - { - return new Confidence(value); - } - - /// Implicit operator to convert Confidence to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence e) - { - return e._value; - } - - /// Overriding != operator for enum Confidence - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum Confidence - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Confidence e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/CreatedByType.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/CreatedByType.Completer.cs deleted file mode 100644 index 69febd767b63..000000000000 --- a/generated/SelfHelp/SelfHelp.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.SelfHelp.Support -{ - - /// The type of identity that created the resource. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs deleted file mode 100644 index 41822d76e04a..000000000000 --- a/generated/SelfHelp/SelfHelp.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.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/CreatedByType.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/CreatedByType.cs deleted file mode 100644 index de3e68d32596..000000000000 --- a/generated/SelfHelp/SelfHelp.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.SelfHelp.Support -{ - - /// The type of identity that created the resource. - public partial struct CreatedByType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType Application = @"Application"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType Key = @"Key"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType ManagedIdentity = @"ManagedIdentity"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.CreatedByType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.Completer.cs deleted file mode 100644 index 8a10bad997a6..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.Completer.cs +++ /dev/null @@ -1,51 +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.SelfHelp.Support -{ - - /// Status of diagnostic provisioning. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningStateTypeConverter))] - public partial struct DiagnosticProvisioningState : - 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) || "PartialComplete".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'PartialComplete'", "PartialComplete", global::System.Management.Automation.CompletionResultType.ParameterValue, "PartialComplete"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Running".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Running'", "Running", global::System.Management.Automation.CompletionResultType.ParameterValue, "Running"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.TypeConverter.cs deleted file mode 100644 index d2086f2164d0..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.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.SelfHelp.Support -{ - - /// Status of diagnostic provisioning. - public partial class DiagnosticProvisioningStateTypeConverter : - 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) => DiagnosticProvisioningState.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.cs deleted file mode 100644 index 81d12809133c..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/DiagnosticProvisioningState.cs +++ /dev/null @@ -1,113 +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.SelfHelp.Support -{ - - /// Status of diagnostic provisioning. - public partial struct DiagnosticProvisioningState : - System.IEquatable - { - /// When Diagnostic request gets canceled. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState Canceled = @"Canceled"; - - /// All Diagnostics failed to run. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState Failed = @"Failed"; - - /// Some Diagnostics are still running or failed. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState PartialComplete = @"PartialComplete"; - - /// All Diagnostics are still running. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState Running = @"Running"; - - /// All Diagnostics in the Batch succeeded. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState Succeeded = @"Succeeded"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to DiagnosticProvisioningState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new DiagnosticProvisioningState(global::System.Convert.ToString(value)); - } - - /// - /// Creates an instance of the Enum class. - /// - /// the value to create an instance for. - private DiagnosticProvisioningState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type DiagnosticProvisioningState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type DiagnosticProvisioningState (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 DiagnosticProvisioningState && Equals((DiagnosticProvisioningState)obj); - } - - /// Returns hashCode for enum DiagnosticProvisioningState - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for DiagnosticProvisioningState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to DiagnosticProvisioningState - /// the value to convert to an instance of . - - public static implicit operator DiagnosticProvisioningState(string value) - { - return new DiagnosticProvisioningState(value); - } - - /// Implicit operator to convert DiagnosticProvisioningState to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState e) - { - return e._value; - } - - /// Overriding != operator for enum DiagnosticProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum DiagnosticProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.DiagnosticProvisioningState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ExecutionStatus.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ExecutionStatus.Completer.cs deleted file mode 100644 index 8628afa98e36..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ExecutionStatus.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.SelfHelp.Support -{ - - /// Status of Troubleshooter Step execution. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatusTypeConverter))] - public partial struct ExecutionStatus : - 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) || "Success".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Success'", "Success", global::System.Management.Automation.CompletionResultType.ParameterValue, "Success"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Running".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Running'", "Running", global::System.Management.Automation.CompletionResultType.ParameterValue, "Running"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "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) || "Warning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Warning'", "Warning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Warning"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ExecutionStatus.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ExecutionStatus.TypeConverter.cs deleted file mode 100644 index fb32cd28b952..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ExecutionStatus.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.SelfHelp.Support -{ - - /// Status of Troubleshooter Step execution. - public partial class ExecutionStatusTypeConverter : - 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) => ExecutionStatus.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/ExecutionStatus.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ExecutionStatus.cs deleted file mode 100644 index 9fb0324f03f6..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ExecutionStatus.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.SelfHelp.Support -{ - - /// Status of Troubleshooter Step execution. - public partial struct ExecutionStatus : - System.IEquatable - { - /// Step execution failed - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus Failed = @"Failed"; - - /// Step execution running - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus Running = @"Running"; - - /// Step execution succeeded. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus Success = @"Success"; - - /// Step execution warning - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus Warning = @"Warning"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to ExecutionStatus - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ExecutionStatus(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ExecutionStatus - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ExecutionStatus (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 ExecutionStatus && Equals((ExecutionStatus)obj); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ExecutionStatus(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns hashCode for enum ExecutionStatus - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for ExecutionStatus - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ExecutionStatus - /// the value to convert to an instance of . - - public static implicit operator ExecutionStatus(string value) - { - return new ExecutionStatus(value); - } - - /// Implicit operator to convert ExecutionStatus to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus e) - { - return e._value; - } - - /// Overriding != operator for enum ExecutionStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ExecutionStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ExecutionStatus e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ImportanceLevel.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ImportanceLevel.Completer.cs deleted file mode 100644 index 5367ca93b022..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ImportanceLevel.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.SelfHelp.Support -{ - - /// Importance level of the insight. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevelTypeConverter))] - public partial struct ImportanceLevel : - 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) || "Critical".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Critical'", "Critical", global::System.Management.Automation.CompletionResultType.ParameterValue, "Critical"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Warning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Warning'", "Warning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Warning"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Information".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Information'", "Information", global::System.Management.Automation.CompletionResultType.ParameterValue, "Information"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ImportanceLevel.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ImportanceLevel.TypeConverter.cs deleted file mode 100644 index f5c2ff43c867..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ImportanceLevel.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.SelfHelp.Support -{ - - /// Importance level of the insight. - public partial class ImportanceLevelTypeConverter : - 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) => ImportanceLevel.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/ImportanceLevel.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ImportanceLevel.cs deleted file mode 100644 index 03ef573b2d2d..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ImportanceLevel.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.SelfHelp.Support -{ - - /// Importance level of the insight. - public partial struct ImportanceLevel : - System.IEquatable - { - /// A critical insight has been found after running the diagnostic. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel Critical = @"Critical"; - - /// An information insight has been found after running the diagnostic. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel Information = @"Information"; - - /// A warning insight has been found after running the diagnostic. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel Warning = @"Warning"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to ImportanceLevel - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ImportanceLevel(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ImportanceLevel - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ImportanceLevel (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 ImportanceLevel && Equals((ImportanceLevel)obj); - } - - /// Returns hashCode for enum ImportanceLevel - /// 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 ImportanceLevel(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ImportanceLevel - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ImportanceLevel - /// the value to convert to an instance of . - - public static implicit operator ImportanceLevel(string value) - { - return new ImportanceLevel(value); - } - - /// Implicit operator to convert ImportanceLevel to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel e) - { - return e._value; - } - - /// Overriding != operator for enum ImportanceLevel - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ImportanceLevel - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ImportanceLevel e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Name.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Name.Completer.cs deleted file mode 100644 index 3f3aaa56d618..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Name.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.SelfHelp.Support -{ - - /// Trigger criterion name. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.NameTypeConverter))] - public partial struct Name : - 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) || "SolutionId".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SolutionId'", "SolutionId", global::System.Management.Automation.CompletionResultType.ParameterValue, "SolutionId"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "ProblemClassificationId".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'ProblemClassificationId'", "ProblemClassificationId", global::System.Management.Automation.CompletionResultType.ParameterValue, "ProblemClassificationId"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "ReplacementKey".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'ReplacementKey'", "ReplacementKey", global::System.Management.Automation.CompletionResultType.ParameterValue, "ReplacementKey"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Name.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Name.TypeConverter.cs deleted file mode 100644 index 6fbc995cf983..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Name.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.SelfHelp.Support -{ - - /// Trigger criterion name. - public partial class NameTypeConverter : - 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) => Name.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/Name.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Name.cs deleted file mode 100644 index 242e31a9cdbd..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Name.cs +++ /dev/null @@ -1,100 +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.SelfHelp.Support -{ - - /// Trigger criterion name. - public partial struct Name : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name ProblemClassificationId = @"ProblemClassificationId"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name ReplacementKey = @"ReplacementKey"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name SolutionId = @"SolutionId"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to Name - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new Name(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type Name - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type Name (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 Name && Equals((Name)obj); - } - - /// Returns hashCode for enum Name - /// 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 Name(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for Name - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to Name - /// the value to convert to an instance of . - - public static implicit operator Name(string value) - { - return new Name(value); - } - - /// Implicit operator to convert Name to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name e) - { - return e._value; - } - - /// Overriding != operator for enum Name - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum Name - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Name e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Origin.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Origin.Completer.cs deleted file mode 100644 index 021a21d1c76f..000000000000 --- a/generated/SelfHelp/SelfHelp.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.SelfHelp.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.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/Origin.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Origin.TypeConverter.cs deleted file mode 100644 index c2b2b9d497cb..000000000000 --- a/generated/SelfHelp/SelfHelp.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.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/Origin.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Origin.cs deleted file mode 100644 index 4556497d463c..000000000000 --- a/generated/SelfHelp/SelfHelp.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.SelfHelp.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.SelfHelp.Support.Origin System = @"system"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin User = @"user"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.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.SelfHelp.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.SelfHelp.Support.Origin e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Support.Origin e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Origin e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionContentType.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionContentType.Completer.cs deleted file mode 100644 index a692b3d6d50d..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionContentType.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.SelfHelp.Support -{ - - /// Default is Text. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentTypeTypeConverter))] - public partial struct QuestionContentType : - 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) || "Text".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Text'", "Text", global::System.Management.Automation.CompletionResultType.ParameterValue, "Text"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Html".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Html'", "Html", global::System.Management.Automation.CompletionResultType.ParameterValue, "Html"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Markdown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Markdown'", "Markdown", global::System.Management.Automation.CompletionResultType.ParameterValue, "Markdown"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionContentType.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionContentType.TypeConverter.cs deleted file mode 100644 index 6ee5a442f683..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionContentType.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.SelfHelp.Support -{ - - /// Default is Text. - public partial class QuestionContentTypeTypeConverter : - 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) => QuestionContentType.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionContentType.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionContentType.cs deleted file mode 100644 index cfdf98abedc8..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionContentType.cs +++ /dev/null @@ -1,100 +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.SelfHelp.Support -{ - - /// Default is Text. - public partial struct QuestionContentType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType Html = @"Html"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType Markdown = @"Markdown"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType Text = @"Text"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to QuestionContentType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new QuestionContentType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type QuestionContentType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type QuestionContentType (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 QuestionContentType && Equals((QuestionContentType)obj); - } - - /// Returns hashCode for enum QuestionContentType - /// 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 QuestionContentType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for QuestionContentType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to QuestionContentType - /// the value to convert to an instance of . - - public static implicit operator QuestionContentType(string value) - { - return new QuestionContentType(value); - } - - /// Implicit operator to convert QuestionContentType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType e) - { - return e._value; - } - - /// Overriding != operator for enum QuestionContentType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum QuestionContentType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionContentType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.Completer.cs deleted file mode 100644 index f3e97bc0b170..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.Completer.cs +++ /dev/null @@ -1,55 +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.SelfHelp.Support -{ - - /// Type of Question - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionTypeTypeConverter))] - public partial struct QuestionType : - 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) || "RadioButton".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'RadioButton'", "RadioButton", global::System.Management.Automation.CompletionResultType.ParameterValue, "RadioButton"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Dropdown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Dropdown'", "Dropdown", global::System.Management.Automation.CompletionResultType.ParameterValue, "Dropdown"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "TextInput".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'TextInput'", "TextInput", global::System.Management.Automation.CompletionResultType.ParameterValue, "TextInput"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "MultiLineInfoBox".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'MultiLineInfoBox'", "MultiLineInfoBox", global::System.Management.Automation.CompletionResultType.ParameterValue, "MultiLineInfoBox"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "DateTimePicker".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'DateTimePicker'", "DateTimePicker", global::System.Management.Automation.CompletionResultType.ParameterValue, "DateTimePicker"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "MultiSelect".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'MultiSelect'", "MultiSelect", global::System.Management.Automation.CompletionResultType.ParameterValue, "MultiSelect"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.TypeConverter.cs deleted file mode 100644 index 2d5d6b4edb0d..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.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.SelfHelp.Support -{ - - /// Type of Question - public partial class QuestionTypeTypeConverter : - 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) => QuestionType.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.cs deleted file mode 100644 index 584b94b26749..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/QuestionType.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.SelfHelp.Support -{ - - /// Type of Question - public partial struct QuestionType : - System.IEquatable - { - /// DateTime Picker - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType DateTimePicker = @"DateTimePicker"; - - /// SingleChoice dropdown. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType Dropdown = @"Dropdown"; - - /// MultiLineInfoBox - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType MultiLineInfoBox = @"MultiLineInfoBox"; - - /// Multi Select - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType MultiSelect = @"MultiSelect"; - - /// SingleChoice radio button - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType RadioButton = @"RadioButton"; - - /// Text Input - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType TextInput = @"TextInput"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to QuestionType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new QuestionType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type QuestionType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type QuestionType (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 QuestionType && Equals((QuestionType)obj); - } - - /// Returns hashCode for enum QuestionType - /// 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 QuestionType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for QuestionType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to QuestionType - /// the value to convert to an instance of . - - public static implicit operator QuestionType(string value) - { - return new QuestionType(value); - } - - /// Implicit operator to convert QuestionType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType e) - { - return e._value; - } - - /// Overriding != operator for enum QuestionType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum QuestionType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.QuestionType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ResultType.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ResultType.Completer.cs deleted file mode 100644 index 01259b55d593..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ResultType.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.SelfHelp.Support -{ - - /// Result type of the search result. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultTypeTypeConverter))] - public partial struct ResultType : - 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) || "Community".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Community'", "Community", global::System.Management.Automation.CompletionResultType.ParameterValue, "Community"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Documentation".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Documentation'", "Documentation", global::System.Management.Automation.CompletionResultType.ParameterValue, "Documentation"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ResultType.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ResultType.TypeConverter.cs deleted file mode 100644 index c04e3bb98d00..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ResultType.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.SelfHelp.Support -{ - - /// Result type of the search result. - public partial class ResultTypeTypeConverter : - 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) => ResultType.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/ResultType.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ResultType.cs deleted file mode 100644 index 3b33e719aebc..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ResultType.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.SelfHelp.Support -{ - - /// Result type of the search result. - public partial struct ResultType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType Community = @"Community"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType Documentation = @"Documentation"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to ResultType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ResultType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ResultType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ResultType (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 ResultType && Equals((ResultType)obj); - } - - /// Returns hashCode for enum ResultType - /// 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 ResultType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ResultType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ResultType - /// the value to convert to an instance of . - - public static implicit operator ResultType(string value) - { - return new ResultType(value); - } - - /// Implicit operator to convert ResultType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType e) - { - return e._value; - } - - /// Overriding != operator for enum ResultType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ResultType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ResultType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.Completer.cs deleted file mode 100644 index dd03ffdce267..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.Completer.cs +++ /dev/null @@ -1,51 +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.SelfHelp.Support -{ - - /// Status of solution provisioning. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningStateTypeConverter))] - public partial struct SolutionProvisioningState : - 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) || "PartialComplete".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'PartialComplete'", "PartialComplete", global::System.Management.Automation.CompletionResultType.ParameterValue, "PartialComplete"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Running".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Running'", "Running", global::System.Management.Automation.CompletionResultType.ParameterValue, "Running"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.TypeConverter.cs deleted file mode 100644 index 1d4ced8c1755..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.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.SelfHelp.Support -{ - - /// Status of solution provisioning. - public partial class SolutionProvisioningStateTypeConverter : - 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) => SolutionProvisioningState.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.cs deleted file mode 100644 index 371fd1c1278b..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionProvisioningState.cs +++ /dev/null @@ -1,109 +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.SelfHelp.Support -{ - - /// Status of solution provisioning. - public partial struct SolutionProvisioningState : - System.IEquatable - { - /// When Solutions request gets canceled. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState Canceled = @"Canceled"; - - /// All Solutions failed to run. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState Failed = @"Failed"; - - /// Some Solutions are still running or failed. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState PartialComplete = @"PartialComplete"; - - /// All Solutions are still running. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState Running = @"Running"; - - /// All Solutions in the Batch succeeded. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState Succeeded = @"Succeeded"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to SolutionProvisioningState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new SolutionProvisioningState(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type SolutionProvisioningState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type SolutionProvisioningState (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 SolutionProvisioningState && Equals((SolutionProvisioningState)obj); - } - - /// Returns hashCode for enum SolutionProvisioningState - /// 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 SolutionProvisioningState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for SolutionProvisioningState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to SolutionProvisioningState - /// the value to convert to an instance of . - - public static implicit operator SolutionProvisioningState(string value) - { - return new SolutionProvisioningState(value); - } - - /// Implicit operator to convert SolutionProvisioningState to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState e) - { - return e._value; - } - - /// Overriding != operator for enum SolutionProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum SolutionProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionProvisioningState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.Completer.cs deleted file mode 100644 index d4ba6a8357e6..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.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.SelfHelp.Support -{ - - /// Solution Type. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionTypeTypeConverter))] - public partial struct SolutionType : - 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) || "Diagnostics".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Diagnostics'", "Diagnostics", global::System.Management.Automation.CompletionResultType.ParameterValue, "Diagnostics"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Solutions".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Solutions'", "Solutions", global::System.Management.Automation.CompletionResultType.ParameterValue, "Solutions"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Troubleshooters".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Troubleshooters'", "Troubleshooters", global::System.Management.Automation.CompletionResultType.ParameterValue, "Troubleshooters"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SelfHelp".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SelfHelp'", "SelfHelp", global::System.Management.Automation.CompletionResultType.ParameterValue, "SelfHelp"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.TypeConverter.cs deleted file mode 100644 index 0f6832117764..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.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.SelfHelp.Support -{ - - /// Solution Type. - public partial class SolutionTypeTypeConverter : - 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) => SolutionType.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.cs deleted file mode 100644 index b6b1948a9288..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/SolutionType.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.SelfHelp.Support -{ - - /// Solution Type. - public partial struct SolutionType : - System.IEquatable - { - /// Diagnostics resource type. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType Diagnostics = @"Diagnostics"; - - /// SelfHelp resource type. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType SelfHelp = @"SelfHelp"; - - /// Solutions resource type. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType Solutions = @"Solutions"; - - /// Troubleshooters resource type. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType Troubleshooters = @"Troubleshooters"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to SolutionType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new SolutionType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type SolutionType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type SolutionType (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 SolutionType && Equals((SolutionType)obj); - } - - /// Returns hashCode for enum SolutionType - /// 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 SolutionType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for SolutionType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to SolutionType - /// the value to convert to an instance of . - - public static implicit operator SolutionType(string value) - { - return new SolutionType(value); - } - - /// Implicit operator to convert SolutionType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType e) - { - return e._value; - } - - /// Overriding != operator for enum SolutionType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum SolutionType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.SolutionType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Status.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Status.Completer.cs deleted file mode 100644 index cae909eb69dd..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Status.Completer.cs +++ /dev/null @@ -1,51 +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.SelfHelp.Support -{ - - /// Denotes the status of the diagnostic resource. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.StatusTypeConverter))] - public partial struct Status : - 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) || "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) || "MissingInputs".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'MissingInputs'", "MissingInputs", global::System.Management.Automation.CompletionResultType.ParameterValue, "MissingInputs"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Running".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Running'", "Running", global::System.Management.Automation.CompletionResultType.ParameterValue, "Running"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "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) || "Timeout".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Timeout'", "Timeout", global::System.Management.Automation.CompletionResultType.ParameterValue, "Timeout"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Status.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Status.TypeConverter.cs deleted file mode 100644 index 80f119686936..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Status.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.SelfHelp.Support -{ - - /// Denotes the status of the diagnostic resource. - public partial class StatusTypeConverter : - 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) => Status.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/Status.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Status.cs deleted file mode 100644 index cdb0fdb02219..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Status.cs +++ /dev/null @@ -1,109 +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.SelfHelp.Support -{ - - /// Denotes the status of the diagnostic resource. - public partial struct Status : - System.IEquatable - { - /// Diagnostic creation failed. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status Failed = @"Failed"; - - /// Request is missing required inputs to run. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status MissingInputs = @"MissingInputs"; - - /// Diagnostic is still running. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status Running = @"Running"; - - /// Diagnostic creation succeeded. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status Succeeded = @"Succeeded"; - - /// Diagnostic was timed out. - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status Timeout = @"Timeout"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to Status - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new Status(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type Status - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type Status (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 Status && Equals((Status)obj); - } - - /// Returns hashCode for enum Status - /// 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 Status(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for Status - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to Status - /// the value to convert to an instance of . - - public static implicit operator Status(string value) - { - return new Status(value); - } - - /// Implicit operator to convert Status to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status e) - { - return e._value; - } - - /// Overriding != operator for enum Status - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum Status - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Status e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/TroubleshooterProvisioningState.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/TroubleshooterProvisioningState.Completer.cs deleted file mode 100644 index c1f7ac6613bc..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/TroubleshooterProvisioningState.Completer.cs +++ /dev/null @@ -1,51 +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.SelfHelp.Support -{ - - /// Status of troubleshooter provisioning. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningStateTypeConverter))] - public partial struct TroubleshooterProvisioningState : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Running".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Running'", "Running", global::System.Management.Automation.CompletionResultType.ParameterValue, "Running"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "AutoContinue".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'AutoContinue'", "AutoContinue", global::System.Management.Automation.CompletionResultType.ParameterValue, "AutoContinue"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/TroubleshooterProvisioningState.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/TroubleshooterProvisioningState.TypeConverter.cs deleted file mode 100644 index 31c944503cc2..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/TroubleshooterProvisioningState.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.SelfHelp.Support -{ - - /// Status of troubleshooter provisioning. - public partial class TroubleshooterProvisioningStateTypeConverter : - 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) => TroubleshooterProvisioningState.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/TroubleshooterProvisioningState.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/TroubleshooterProvisioningState.cs deleted file mode 100644 index a74e22b75972..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/TroubleshooterProvisioningState.cs +++ /dev/null @@ -1,110 +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.SelfHelp.Support -{ - - /// Status of troubleshooter provisioning. - public partial struct TroubleshooterProvisioningState : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState AutoContinue = @"AutoContinue"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState Canceled = @"Canceled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState Running = @"Running"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState Succeeded = @"Succeeded"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to TroubleshooterProvisioningState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new TroubleshooterProvisioningState(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type TroubleshooterProvisioningState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState e) - { - return _value.Equals(e._value); - } - - /// - /// Compares values of enum type TroubleshooterProvisioningState (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 TroubleshooterProvisioningState && Equals((TroubleshooterProvisioningState)obj); - } - - /// Returns hashCode for enum TroubleshooterProvisioningState - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for TroubleshooterProvisioningState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// - /// Creates an instance of the Enum class. - /// - /// the value to create an instance for. - private TroubleshooterProvisioningState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Implicit operator to convert string to TroubleshooterProvisioningState - /// the value to convert to an instance of . - - public static implicit operator TroubleshooterProvisioningState(string value) - { - return new TroubleshooterProvisioningState(value); - } - - /// Implicit operator to convert TroubleshooterProvisioningState to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState e) - { - return e._value; - } - - /// Overriding != operator for enum TroubleshooterProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum TroubleshooterProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TroubleshooterProvisioningState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.Completer.cs deleted file mode 100644 index 46526170135d..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.Completer.cs +++ /dev/null @@ -1,51 +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.SelfHelp.Support -{ - - /// Type of Troubleshooting step. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.TypeTypeConverter))] - public partial struct Type : - 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) || "Decision".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Decision'", "Decision", global::System.Management.Automation.CompletionResultType.ParameterValue, "Decision"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Solution".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Solution'", "Solution", global::System.Management.Automation.CompletionResultType.ParameterValue, "Solution"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Insight".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Insight'", "Insight", global::System.Management.Automation.CompletionResultType.ParameterValue, "Insight"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "AutomatedCheck".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'AutomatedCheck'", "AutomatedCheck", global::System.Management.Automation.CompletionResultType.ParameterValue, "AutomatedCheck"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Input".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Input'", "Input", global::System.Management.Automation.CompletionResultType.ParameterValue, "Input"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.TypeConverter.cs deleted file mode 100644 index e62b6f524876..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.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.SelfHelp.Support -{ - - /// Type of Troubleshooting step. - public partial class TypeTypeConverter : - 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) => Type.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/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.cs deleted file mode 100644 index ce441900df21..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/Type.cs +++ /dev/null @@ -1,104 +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.SelfHelp.Support -{ - - /// Type of Troubleshooting step. - public partial struct Type : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type AutomatedCheck = @"AutomatedCheck"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type Decision = @"Decision"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type Input = @"Input"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type Insight = @"Insight"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type Solution = @"Solution"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to Type - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new Type(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type Type - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type Type (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 Type && Equals((Type)obj); - } - - /// Returns hashCode for enum Type - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for Type - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private Type(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Implicit operator to convert string to Type - /// the value to convert to an instance of . - - public static implicit operator Type(string value) - { - return new Type(value); - } - - /// Implicit operator to convert Type to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type e) - { - return e._value; - } - - /// Overriding != operator for enum Type - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum Type - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.Type e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.Completer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.Completer.cs deleted file mode 100644 index 7f4a46d9ff11..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.Completer.cs +++ /dev/null @@ -1,51 +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.SelfHelp.Support -{ - - /// Validation scope - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScopeTypeConverter))] - public partial struct ValidationScope : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'None'", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "URLFormat".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'URLFormat'", "URLFormat", global::System.Management.Automation.CompletionResultType.ParameterValue, "URLFormat"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "GuidFormat".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'GuidFormat'", "GuidFormat", global::System.Management.Automation.CompletionResultType.ParameterValue, "GuidFormat"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "IpAddressFormat".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'IpAddressFormat'", "IpAddressFormat", global::System.Management.Automation.CompletionResultType.ParameterValue, "IpAddressFormat"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "NumberOnlyFormat".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'NumberOnlyFormat'", "NumberOnlyFormat", global::System.Management.Automation.CompletionResultType.ParameterValue, "NumberOnlyFormat"); - } - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.TypeConverter.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.TypeConverter.cs deleted file mode 100644 index f7ce35f009f8..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.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.SelfHelp.Support -{ - - /// Validation scope - public partial class ValidationScopeTypeConverter : - global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ValidationScope.CreateFrom(sourceValue); - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.cs deleted file mode 100644 index e7d7652069b9..000000000000 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/api/Support/ValidationScope.cs +++ /dev/null @@ -1,104 +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.SelfHelp.Support -{ - - /// Validation scope - public partial struct ValidationScope : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope GuidFormat = @"GuidFormat"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope IPAddressFormat = @"IpAddressFormat"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope None = @"None"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope NumberOnlyFormat = @"NumberOnlyFormat"; - - public static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope UrlFormat = @"URLFormat"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to ValidationScope - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ValidationScope(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ValidationScope - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ValidationScope (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ValidationScope && Equals((ValidationScope)obj); - } - - /// Returns hashCode for enum ValidationScope - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for ValidationScope - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ValidationScope(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Implicit operator to convert string to ValidationScope - /// the value to convert to an instance of . - - public static implicit operator ValidationScope(string value) - { - return new ValidationScope(value); - } - - /// Implicit operator to convert ValidationScope to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope e) - { - return e._value; - } - - /// Overriding != operator for enum ValidationScope - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ValidationScope - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope e1, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support.ValidationScope e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_Get.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_Get.cs index da4dd2e36fd8..bd2f9a7f5533 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_Get.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpDiagnostic_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpDiagnostic_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class GetAzSelfHelpDiagnostic_Get : 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 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzSelfHelpDiagnostic_Get : global::System.Management.Aut [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -80,7 +101,7 @@ public partial class GetAzSelfHelpDiagnostic_Get : global::System.Management.Aut /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -134,24 +155,24 @@ public partial class GetAzSelfHelpDiagnostic_Get : 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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.IDiagnosticResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -174,6 +195,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -195,7 +221,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzSelfHelpDiagnostic_Get() { @@ -246,8 +272,33 @@ public GetAzSelfHelpDiagnostic_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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -300,7 +351,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -318,7 +369,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -356,12 +407,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -378,15 +429,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SResourceName=SResourceName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SResourceName=SResourceName }) + 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 } }); @@ -396,12 +447,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,8 +464,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_GetViaIdentity.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_GetViaIdentity.cs index cb4208bfad7e..36cecef2c337 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_GetViaIdentity.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiagnostic_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpDiagnostic_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpDiagnostic_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class GetAzSelfHelpDiagnostic_GetViaIdentity : global::System.Man /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzSelfHelpDiagnostic_GetViaIdentity : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// 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] @@ -88,7 +109,7 @@ public partial class GetAzSelfHelpDiagnostic_GetViaIdentity : global::System.Man /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -111,24 +132,24 @@ public partial class GetAzSelfHelpDiagnostic_GetViaIdentity : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.IDiagnosticResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -151,6 +172,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -172,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzSelfHelpDiagnostic_GetViaIdentity() { @@ -223,8 +249,33 @@ public GetAzSelfHelpDiagnostic_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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -311,7 +362,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -349,12 +400,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -371,7 +422,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.SelfHelp.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -389,12 +440,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -406,8 +457,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiscoverySolution_List.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiscoverySolution_List.cs index ca5228f3ab7e..9afd9e816d44 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiscoverySolution_List.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpDiscoverySolution_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -20,12 +22,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] List=>GET:"/providers/Microsoft.Help/discoverySolutions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpDiscoverySolution_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Lists the relevant Azure diagnostics and solutions using [problemClassification API](https://learn.microsoft.com/rest/api/support/problem-classifications/list?tabs=HTTP)) AND resourceUri or resourceType.
Discovery Solutions is the initial entry point within Help API, which identifies relevant Azure diagnostics and solutions.

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

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics and Solutions API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/discoverySolutions", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpDiscoverySolution_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -41,17 +44,32 @@ public partial class GetAzSelfHelpDiscoverySolution_List : global::System.Manage ///
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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -65,6 +83,9 @@ public partial class GetAzSelfHelpDiscoverySolution_List : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Backing field for property. private string _filter; @@ -109,7 +130,7 @@ public partial class GetAzSelfHelpDiscoverySolution_List : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -146,24 +167,24 @@ public partial class GetAzSelfHelpDiscoverySolution_List : global::System.Manage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -186,6 +207,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -207,7 +233,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzSelfHelpDiscoverySolution_List() { @@ -258,8 +284,33 @@ public GetAzSelfHelpDiscoverySolution_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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -312,7 +363,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -330,7 +381,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Skiptoken=this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null,Skiptoken=this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -368,12 +419,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -390,15 +441,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Skiptoken=this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Skiptoken=this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -408,12 +459,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -425,15 +476,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryResponse + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpOperation_List.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpOperation_List.cs index 6edfd2a3fc47..8feaf1cb9991 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpOperation_List.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpOperation_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// Returns list of operations. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpOperation_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Returns list of operations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/operations", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpOperation_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 GetAzSelfHelpOperation_List : 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class GetAzSelfHelpOperation_List : global::System.Management.Aut [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 GetAzSelfHelpOperation_List : global::System.Management.Aut /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -108,24 +129,24 @@ public partial class GetAzSelfHelpOperation_List : 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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api40.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResult /// 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) @@ -148,6 +169,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -169,7 +195,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzSelfHelpOperation_List() { @@ -220,8 +246,33 @@ public GetAzSelfHelpOperation_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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -274,7 +325,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -292,7 +343,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -330,12 +381,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -352,7 +403,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.SelfHelp.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -370,12 +421,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResult /// 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 ) { @@ -387,15 +438,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperationListResult + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_Get.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_Get.cs index 8ad891ecce73..23fe47cc1a0b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_Get.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpSimplifiedSolution_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpSimplifiedSolution_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class GetAzSelfHelpSimplifiedSolution_Get : global::System.Manage /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzSelfHelpSimplifiedSolution_Get : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -80,7 +101,7 @@ public partial class GetAzSelfHelpSimplifiedSolution_Get : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -134,24 +155,24 @@ public partial class GetAzSelfHelpSimplifiedSolution_Get : global::System.Manage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -174,6 +195,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -195,7 +221,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzSelfHelpSimplifiedSolution_Get() { @@ -246,8 +272,33 @@ public GetAzSelfHelpSimplifiedSolution_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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -300,7 +351,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -318,7 +369,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -356,12 +407,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -378,15 +429,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SResourceName=SResourceName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SResourceName=SResourceName }) + 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 } }); @@ -396,12 +447,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,8 +464,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_GetViaIdentity.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_GetViaIdentity.cs index eeca26eeda8a..35fe08ea9ab7 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_GetViaIdentity.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSimplifiedSolution_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpSimplifiedSolution_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Get the simplified Solutions using the applicable solutionResourceName while creating the simplified Solutions.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpSimplifiedSolution_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class GetAzSelfHelpSimplifiedSolution_GetViaIdentity : global::Sy /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzSelfHelpSimplifiedSolution_GetViaIdentity : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -88,7 +109,7 @@ public partial class GetAzSelfHelpSimplifiedSolution_GetViaIdentity : global::Sy /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -111,24 +132,24 @@ public partial class GetAzSelfHelpSimplifiedSolution_GetViaIdentity : global::Sy /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -151,6 +172,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -172,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzSelfHelpSimplifiedSolution_GetViaIdentity() { @@ -223,8 +249,33 @@ public GetAzSelfHelpSimplifiedSolution_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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -311,7 +362,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -349,12 +400,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -371,7 +422,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.SelfHelp.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -389,12 +440,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -406,8 +457,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_Get.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_Get.cs index c7f3931a11ef..60ce8429bad3 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_Get.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/providers/Microsoft.Help/selfHelp/{solutionId}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpSolutionSelfHelp_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot their issues.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/selfHelp/{solutionId}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpSolutionSelfHelp_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class GetAzSelfHelpSolutionSelfHelp_Get : global::System.Manageme /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class GetAzSelfHelpSolutionSelfHelp_Get : global::System.Manageme [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -81,7 +102,7 @@ public partial class GetAzSelfHelpSolutionSelfHelp_Get : global::System.Manageme /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -120,24 +141,24 @@ public partial class GetAzSelfHelpSolutionSelfHelp_Get : global::System.Manageme /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + 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) @@ -160,6 +181,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -181,7 +207,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzSelfHelpSolutionSelfHelp_Get() { @@ -232,8 +258,33 @@ public GetAzSelfHelpSolutionSelfHelp_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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -286,7 +337,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -304,7 +355,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SolutionId=SolutionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SolutionId=SolutionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -342,12 +393,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -364,15 +415,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SolutionId=SolutionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SolutionId=SolutionId }) + 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 } }); @@ -382,12 +433,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -399,8 +450,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_GetViaIdentity.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_GetViaIdentity.cs index 30685e4e15e3..2303bbd45bd7 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_GetViaIdentity.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolutionSelfHelp_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/providers/Microsoft.Help/selfHelp/{solutionId}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpSolutionSelfHelp_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Finds and Executes a Self Help Solution based on the Solution Id. These are static self help content to help users troubleshoot their issues.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/selfHelp/{solutionId}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpSolutionSelfHelp_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class GetAzSelfHelpSolutionSelfHelp_GetViaIdentity : global::Syst /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class GetAzSelfHelpSolutionSelfHelp_GetViaIdentity : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -89,7 +110,7 @@ public partial class GetAzSelfHelpSolutionSelfHelp_GetViaIdentity : global::Syst /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -112,24 +133,24 @@ public partial class GetAzSelfHelpSolutionSelfHelp_GetViaIdentity : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -152,6 +173,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -173,7 +199,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzSelfHelpSolutionSelfHelp_GetViaIdentity() { @@ -224,8 +250,33 @@ public GetAzSelfHelpSolutionSelfHelp_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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -278,7 +329,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -308,7 +359,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -346,12 +397,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -368,7 +419,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.SelfHelp.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -386,12 +437,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -403,8 +454,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_Get.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_Get.cs index d84c36ab0eb5..aec2450ccafa 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_Get.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpSolution_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Get the solution using the applicable solutionResourceName while creating the solution.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpSolution_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class GetAzSelfHelpSolution_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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzSelfHelpSolution_Get : global::System.Management.Autom [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -80,7 +101,7 @@ public partial class GetAzSelfHelpSolution_Get : global::System.Management.Autom /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -134,24 +155,24 @@ public partial class GetAzSelfHelpSolution_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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -174,6 +195,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -195,7 +221,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzSelfHelpSolution_Get() { @@ -246,8 +272,33 @@ public GetAzSelfHelpSolution_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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -300,7 +351,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -318,7 +369,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,ResourceName=ResourceName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,ResourceName=ResourceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -356,12 +407,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -378,15 +429,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, ResourceName=ResourceName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, ResourceName=ResourceName }) + 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 } }); @@ -396,12 +447,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,8 +464,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_GetViaIdentity.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_GetViaIdentity.cs index d3d9b33e415c..75a22c99ce06 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_GetViaIdentity.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpSolution_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpSolution_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Get the solution using the applicable solutionResourceName while creating the solution.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpSolution_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class GetAzSelfHelpSolution_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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class GetAzSelfHelpSolution_GetViaIdentity : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -88,7 +109,7 @@ public partial class GetAzSelfHelpSolution_GetViaIdentity : global::System.Manag /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -111,24 +132,24 @@ public partial class GetAzSelfHelpSolution_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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -151,6 +172,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -172,7 +198,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzSelfHelpSolution_GetViaIdentity() { @@ -223,8 +249,33 @@ public GetAzSelfHelpSolution_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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -311,7 +362,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -349,12 +400,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -371,7 +422,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.SelfHelp.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -389,12 +440,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -406,8 +457,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_Get.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_Get.cs index 44cfae54a2ab..c6789f53328b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_Get.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_Get.cs @@ -6,24 +6,27 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// /// Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is /// being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and /// result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created - /// using the Create API. + /// using the get API. ///
/// /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpTroubleshooter_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created using the Create API.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created using the get API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpTroubleshooter_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -39,11 +42,26 @@ public partial class GetAzSelfHelpTroubleshooter_Get : 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(); + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -57,6 +75,9 @@ public partial class GetAzSelfHelpTroubleshooter_Get : global::System.Management [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -98,7 +119,7 @@ public partial class GetAzSelfHelpTroubleshooter_Get : global::System.Management /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -137,24 +158,24 @@ public partial class GetAzSelfHelpTroubleshooter_Get : 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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -177,6 +198,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -198,7 +224,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzSelfHelpTroubleshooter_Get() { @@ -249,8 +275,33 @@ public GetAzSelfHelpTroubleshooter_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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -303,7 +354,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -321,7 +372,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -359,12 +410,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -381,15 +432,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, 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 } }); @@ -399,12 +450,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -416,8 +467,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_GetViaIdentity.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_GetViaIdentity.cs index 4f9276a91f7f..f97bd39d1c5d 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_GetViaIdentity.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/GetAzSelfHelpTroubleshooter_GetViaIdentity.cs @@ -6,24 +6,27 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// /// Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is /// being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and /// result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created - /// using the Create API. + /// using the get API. ///
/// /// [OpenAPI] Get=>GET:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSelfHelpTroubleshooter_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created using the Create API.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created using the get API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", ApiVersion = "2024-03-01-preview")] public partial class GetAzSelfHelpTroubleshooter_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -39,11 +42,26 @@ public partial class GetAzSelfHelpTroubleshooter_GetViaIdentity : 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(); + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -57,6 +75,9 @@ public partial class GetAzSelfHelpTroubleshooter_GetViaIdentity : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -91,7 +112,7 @@ public partial class GetAzSelfHelpTroubleshooter_GetViaIdentity : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -114,24 +135,24 @@ public partial class GetAzSelfHelpTroubleshooter_GetViaIdentity : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -154,6 +175,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -175,7 +201,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzSelfHelpTroubleshooter_GetViaIdentity() { @@ -226,8 +252,33 @@ public GetAzSelfHelpTroubleshooter_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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -280,7 +331,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -314,7 +365,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -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.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,8 +460,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_Post.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_Post.cs index edbabc87ca1f..53499e7b0907 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_Post.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_Post.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Post=>POST:"/{scope}/providers/Microsoft.Help/checkNameAvailability" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpCheckNameAvailability_Post", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/checkNameAvailability", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpCheckNameAvailability_Post : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,13 +39,28 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_Post : 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(); + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; } } + /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest _checkNameAvailabilityRequest; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest _checkNameAvailabilityRequest; /// The check availability request body. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The check availability request body.", ValueFromPipeline = true)] @@ -51,8 +69,9 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_Post : global::System ReadOnly = false, Description = @"The check availability request body.", SerializedName = @"checkNameAvailabilityRequest", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest CheckNameAvailabilityRequest { get => this._checkNameAvailabilityRequest; set => this._checkNameAvailabilityRequest = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest CheckNameAvailabilityRequest { get => this._checkNameAvailabilityRequest; set => this._checkNameAvailabilityRequest = value; } /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -67,6 +86,9 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_Post : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -93,7 +115,7 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_Post : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -132,24 +154,24 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_Post : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -172,6 +194,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -193,7 +220,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzSelfHelpCheckNameAvailability_Post() { @@ -244,8 +271,33 @@ public InvokeAzSelfHelpCheckNameAvailability_Post() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -301,7 +353,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -319,7 +371,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,body=CheckNameAvailabilityRequest}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -357,12 +409,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -379,15 +431,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, body=CheckNameAvailabilityRequest }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, body=CheckNameAvailabilityRequest }) + 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 } }); @@ -397,12 +449,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -414,8 +466,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostExpanded.cs index abb3cff60f30..4d0af98e5730 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -15,12 +17,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Post=>POST:"/{scope}/providers/Microsoft.Help/checkNameAvailability" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpCheckNameAvailability_PostExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/checkNameAvailability", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpCheckNameAvailability_PostExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,13 +40,28 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostExpanded : global private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// The check availability request body. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest _checkNameAvailabilityRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.CheckNameAvailabilityRequest(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest _checkNameAvailabilityRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.CheckNameAvailabilityRequest(); + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -57,6 +75,9 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 InvokeAzSelfHelpCheckNameAvailability_PostExpanded : global /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -144,24 +165,24 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostExpanded : global /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -184,6 +205,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -205,7 +231,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzSelfHelpCheckNameAvailability_PostExpanded() { @@ -256,8 +282,33 @@ public InvokeAzSelfHelpCheckNameAvailability_PostExpanded() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -313,7 +364,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -331,7 +382,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,body=_checkNameAvailabilityRequestBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -369,12 +420,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -391,15 +442,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, body=_checkNameAvailabilityRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, body=_checkNameAvailabilityRequestBody }) + 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 } }); @@ -409,12 +460,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,8 +477,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaJsonFilePath.cs similarity index 76% rename from generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaJsonFilePath.cs index e0d79cc09e72..9eb2937d5896 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaJsonFilePath.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -14,13 +16,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// /// [OpenAPI] Post=>POST:"/{scope}/providers/Microsoft.Help/checkNameAvailability" /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpCheckNameAvailability_PostViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse))] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpCheckNameAvailability_PostViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/checkNameAvailability", ApiVersion = "2024-03-01-preview")] - public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,23 +40,27 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity : glo /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest _checkNameAvailabilityRequest; - - /// The check availability request body. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The check availability request body.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The check availability request body.", - SerializedName = @"checkNameAvailabilityRequest", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest CheckNameAvailabilityRequest { get => this._checkNameAvailabilityRequest; set => this._checkNameAvailabilityRequest = value; } + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -67,6 +75,9 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity : glo [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -79,17 +90,22 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity : glo [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Post operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Post operation")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Post 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. /// @@ -101,7 +117,7 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity : glo /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -119,29 +135,45 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity : glo [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -164,6 +196,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -185,9 +222,9 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// - public InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity() + public InvokeAzSelfHelpCheckNameAvailability_PostViaJsonFilePath() { } @@ -236,8 +273,33 @@ public InvokeAzSelfHelpCheckNameAvailability_PostViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -293,7 +355,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -306,24 +368,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.CheckNameAvailabilityPostViaIdentity(InputObject.Id, CheckNameAvailabilityRequest, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.Scope) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Scope"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.CheckNameAvailabilityPost(InputObject.Scope ?? null, CheckNameAvailabilityRequest, onOk, onDefault, this, Pipeline); - } + await this.Client.CheckNameAvailabilityPostViaJsonString(Scope, _jsonString, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=CheckNameAvailabilityRequest}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -361,12 +411,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -383,15 +433,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=CheckNameAvailabilityRequest }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=CheckNameAvailabilityRequest }) + 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 } }); @@ -401,12 +451,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,8 +468,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaJsonString.cs similarity index 77% rename from generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpanded.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaJsonString.cs index 1380ae700965..87b2e69ce9ae 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpCheckNameAvailability_PostViaJsonString.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -14,13 +16,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// /// [OpenAPI] Post=>POST:"/{scope}/providers/Microsoft.Help/checkNameAvailability" /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpCheckNameAvailability_PostViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse))] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpCheckNameAvailability_PostViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/checkNameAvailability", ApiVersion = "2024-03-01-preview")] - public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,14 +40,26 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpand /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - /// The check availability request body. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest _checkNameAvailabilityRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.CheckNameAvailabilityRequest(); + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -57,6 +73,9 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpand [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -69,17 +88,22 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpand [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Post operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Post operation")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Post operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -88,21 +112,10 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpand /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - /// The name of the resource for which availability needs to be checked. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the resource for which availability needs to be checked.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the resource for which availability needs to be checked.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - public string Name { get => _checkNameAvailabilityRequestBody.Name ?? null; set => _checkNameAvailabilityRequestBody.Name = value; } - /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -120,40 +133,45 @@ public partial class InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpand [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - /// The resource type. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The resource type.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, + Required = true, ReadOnly = false, - Description = @"The resource type.", - SerializedName = @"type", + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", PossibleTypes = new [] { typeof(string) })] - public string Type { get => _checkNameAvailabilityRequestBody.Type ?? null; set => _checkNameAvailabilityRequestBody.Type = value; } + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -176,6 +194,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -197,9 +220,9 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// - public InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpanded() + public InvokeAzSelfHelpCheckNameAvailability_PostViaJsonString() { } @@ -248,8 +271,33 @@ public InvokeAzSelfHelpCheckNameAvailability_PostViaIdentityExpanded() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -305,7 +353,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -318,24 +366,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.CheckNameAvailabilityPostViaIdentity(InputObject.Id, _checkNameAvailabilityRequestBody, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.Scope) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Scope"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.CheckNameAvailabilityPost(InputObject.Scope ?? null, _checkNameAvailabilityRequestBody, onOk, onDefault, this, Pipeline); - } + await this.Client.CheckNameAvailabilityPostViaJsonString(Scope, _jsonString, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_checkNameAvailabilityRequestBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -373,12 +409,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -395,15 +431,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_checkNameAvailabilityRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_checkNameAvailabilityRequestBody }) + 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 } }); @@ -413,12 +449,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -430,8 +466,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_Continue.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_Continue.cs index f0402c7310c3..1b1da086af3d 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_Continue.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_Continue.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// /// Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource /// name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the - /// next step in the process. This API is used after the Troubleshooter has been created using the Create API. + /// next step in the process. This API is used after the Troubleshooter has been created using the continue API. ///
/// /// [OpenAPI] Continue=>POST:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpContinueTroubleshooter_Continue", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the Create API.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the continue API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpContinueTroubleshooter_Continue : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,16 +41,31 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_Continue : global::S /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody _continueRequestBody; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody _continueRequestBody; /// Troubleshooter ContinueRequest body. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Troubleshooter ContinueRequest body.", ValueFromPipeline = true)] @@ -56,8 +74,9 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_Continue : global::S ReadOnly = false, Description = @"Troubleshooter ContinueRequest body.", SerializedName = @"continueRequestBody", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody ContinueRequestBody { get => this._continueRequestBody; set => this._continueRequestBody = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody ContinueRequestBody { get => this._continueRequestBody; set => this._continueRequestBody = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -69,6 +88,9 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_Continue : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -102,7 +124,7 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_Continue : global::S /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -155,12 +177,12 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_Continue : global::S /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 @@ -195,6 +217,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -216,7 +243,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzSelfHelpContinueTroubleshooter_Continue() { @@ -267,8 +294,33 @@ public InvokeAzSelfHelpContinueTroubleshooter_Continue() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -324,7 +376,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -342,7 +394,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,TroubleshooterName=TroubleshooterName,body=ContinueRequestBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,TroubleshooterName=TroubleshooterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -380,12 +432,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -402,15 +454,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, TroubleshooterName=TroubleshooterName, body=ContinueRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, TroubleshooterName=TroubleshooterName, body=ContinueRequestBody }) + 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 } }); diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded.cs index 00f8532de263..5ccf2a1d147f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// /// Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource /// name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the - /// next step in the process. This API is used after the Troubleshooter has been created using the Create API. + /// next step in the process. This API is used after the Troubleshooter has been created using the continue API. ///
/// /// [OpenAPI] Continue=>POST:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpContinueTroubleshooter_ContinueExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the Create API.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the continue API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -39,13 +42,28 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded : g private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Troubleshooter ContinueRequest body. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody _continueRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ContinueRequestBody(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody _continueRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ContinueRequestBody(); + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded : g [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -92,7 +113,7 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded : g /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -119,8 +140,8 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded : g ReadOnly = false, Description = @".", SerializedName = @"responses", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] Response { get => _continueRequestBody.Response ?? null /* arrayOf */; set => _continueRequestBody.Response = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse[] Response { get => _continueRequestBody.Response?.ToArray() ?? null /* fixedArrayOf */; set => _continueRequestBody.Response = (value != null ? new System.Collections.Generic.List(value) : null); } /// Backing field for property. private string _scope; @@ -168,12 +189,12 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded : g /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 @@ -208,6 +229,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -229,7 +255,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded() { @@ -280,8 +306,33 @@ public InvokeAzSelfHelpContinueTroubleshooter_ContinueExpanded() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -337,7 +388,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -355,7 +406,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,TroubleshooterName=TroubleshooterName,body=_continueRequestBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,TroubleshooterName=TroubleshooterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -393,12 +444,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -415,15 +466,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, TroubleshooterName=TroubleshooterName, body=_continueRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, TroubleshooterName=TroubleshooterName, body=_continueRequestBody }) + 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 } }); diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity.cs index 67b35c61c3a0..5463e9a061f8 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// /// Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource /// name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the - /// next step in the process. This API is used after the Troubleshooter has been created using the Create API. + /// next step in the process. This API is used after the Troubleshooter has been created using the continue API. ///
/// /// [OpenAPI] Continue=>POST:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpContinueTroubleshooter_ContinueViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the Create API.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the continue API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,16 +41,31 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody _continueRequestBody; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody _continueRequestBody; /// Troubleshooter ContinueRequest body. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Troubleshooter ContinueRequest body.", ValueFromPipeline = true)] @@ -56,8 +74,9 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity ReadOnly = false, Description = @"Troubleshooter ContinueRequest body.", SerializedName = @"continueRequestBody", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody ContinueRequestBody { get => this._continueRequestBody; set => this._continueRequestBody = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody ContinueRequestBody { get => this._continueRequestBody; set => this._continueRequestBody = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -69,6 +88,9 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -110,7 +132,7 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -133,12 +155,12 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 @@ -173,6 +195,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -194,7 +221,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity() { @@ -245,8 +272,33 @@ public InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -302,7 +354,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -336,7 +388,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ContinueRequestBody}) + 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 } }); @@ -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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ContinueRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ContinueRequestBody }) + 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 } }); diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded.cs index e9d087b51ef0..d91ccb014c95 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// /// Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource /// name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the - /// next step in the process. This API is used after the Troubleshooter has been created using the Create API. + /// next step in the process. This API is used after the Troubleshooter has been created using the continue API. ///
/// /// [OpenAPI] Continue=>POST:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the Create API.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the continue API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -39,13 +42,28 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityE private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Troubleshooter ContinueRequest body. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody _continueRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ContinueRequestBody(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody _continueRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ContinueRequestBody(); + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityE [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -100,7 +121,7 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityE /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -127,8 +148,8 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityE ReadOnly = false, Description = @".", SerializedName = @"responses", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] Response { get => _continueRequestBody.Response ?? null /* arrayOf */; set => _continueRequestBody.Response = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse[] Response { get => _continueRequestBody.Response?.ToArray() ?? null /* fixedArrayOf */; set => _continueRequestBody.Response = (value != null ? new System.Collections.Generic.List(value) : null); } /// Unique id of the result. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Unique id of the result.")] @@ -146,12 +167,12 @@ public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityE /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 @@ -186,6 +207,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -207,7 +233,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet + /// Initializes a new instance of the cmdlet /// class. /// public InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded() @@ -259,8 +285,33 @@ public InvokeAzSelfHelpContinueTroubleshooter_ContinueViaIdentityExpanded() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -316,7 +367,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -350,7 +401,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_continueRequestBody}) + 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 } }); @@ -388,12 +439,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -410,15 +461,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_continueRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_continueRequestBody }) + 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 } }); diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaJsonFilePath.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaJsonFilePath.cs new file mode 100644 index 000000000000..ccd0293318be --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaJsonFilePath.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource + /// name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the + /// next step in the process. This API is used after the Troubleshooter has been created using the continue API. + ///
+ /// + /// [OpenAPI] Continue=>POST:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpContinueTroubleshooter_ContinueViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the continue API.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Continue operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Continue operation")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Continue 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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// Backing field for property. + private string _troubleshooterName; + + /// Troubleshooter resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Troubleshooter resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Troubleshooter resource Name.", + SerializedName = @"troubleshooterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string TroubleshooterName { get => this._troubleshooterName; set => this._troubleshooterName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the header result as a from the remote call + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public InvokeAzSelfHelpContinueTroubleshooter_ContinueViaJsonFilePath() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TroubleshootersContinue' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TroubleshootersContinueViaJsonString(Scope, TroubleshooterName, _jsonString, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,TroubleshooterName=TroubleshooterName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the header result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, headers, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaJsonString.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaJsonString.cs new file mode 100644 index 000000000000..88f78966a4a5 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpContinueTroubleshooter_ContinueViaJsonString.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource + /// name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the + /// next step in the process. This API is used after the Troubleshooter has been created using the continue API. + ///
+ /// + /// [OpenAPI] Continue=>POST:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpContinueTroubleshooter_ContinueViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the continue API.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class InvokeAzSelfHelpContinueTroubleshooter_ContinueViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Continue operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Continue operation")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Continue 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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// Backing field for property. + private string _troubleshooterName; + + /// Troubleshooter resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Troubleshooter resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Troubleshooter resource Name.", + SerializedName = @"troubleshooterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string TroubleshooterName { get => this._troubleshooterName; set => this._troubleshooterName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the header result as a from the remote call + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzSelfHelpContinueTroubleshooter_ContinueViaJsonString() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TroubleshootersContinue' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TroubleshootersContinueViaJsonString(Scope, TroubleshooterName, _jsonString, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,TroubleshooterName=TroubleshooterName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the header result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, headers, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post.cs index 377d309952bb..e037e4f8b863 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// Solution discovery using natural language processing. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Post=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -53,7 +71,7 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post public global::System.Management.Automation.PSObject DefaultProfile { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest _discoverSolutionRequest; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest _discoverSolutionRequest; /// Discover NLP request. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Discover NLP request.", ValueFromPipeline = true)] @@ -62,8 +80,12 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post ReadOnly = false, Description = @"Discover NLP request.", SerializedName = @"discoverSolutionRequest", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest DiscoverSolutionRequest { get => this._discoverSolutionRequest; set => this._discoverSolutionRequest = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest DiscoverSolutionRequest { get => this._discoverSolutionRequest; set => this._discoverSolutionRequest = value; } + + /// 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")] @@ -91,7 +113,7 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -123,7 +145,8 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -132,24 +155,24 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -172,6 +195,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -193,7 +221,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post() { @@ -244,8 +272,33 @@ public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_Post() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -301,7 +354,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -319,7 +372,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=DiscoverSolutionRequest}) + 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 } }); @@ -357,12 +410,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -379,15 +432,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=DiscoverSolutionRequest }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=DiscoverSolutionRequest }) + 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 } }); @@ -397,12 +450,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -414,9 +467,33 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse + var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / value / - WriteObject((await response).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; + } + } } } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded.cs index 73eed045717e..d2efe5f0d945 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// Solution discovery using natural language processing. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Post=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,7 +38,19 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostE private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Discover NLP request. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest _discoverSolutionRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpRequest(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest _discoverSolutionRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiscoveryNlpRequest(); + + /// 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; /// Additional information in the form of a string. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Additional information in the form of a string.")] @@ -53,6 +68,9 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostE [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -66,6 +84,9 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostE [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -103,7 +124,7 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostE /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -133,15 +154,15 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostE public string ResourceId { get => _discoverSolutionRequestBody.ResourceId ?? null; set => _discoverSolutionRequestBody.ResourceId = value; } /// - /// Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP + /// Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP /// Service Id is the GUID which can be found under name field in Services List response /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response", + Description = @"Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response", SerializedName = @"serviceId", PossibleTypes = new [] { typeof(string) })] public string ServiceId { get => _discoverSolutionRequestBody.ServiceId ?? null; set => _discoverSolutionRequestBody.ServiceId = value; } @@ -160,7 +181,8 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostE [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -169,24 +191,24 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostE /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + 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) @@ -209,6 +231,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -230,7 +257,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet + /// Initializes a new instance of the cmdlet /// class. /// public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded() @@ -282,8 +309,33 @@ public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostExpanded() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -339,7 +391,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -357,7 +409,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=_discoverSolutionRequestBody}) + 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 } }); @@ -395,12 +447,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -417,15 +469,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_discoverSolutionRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_discoverSolutionRequestBody }) + 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 } }); @@ -435,12 +487,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -452,9 +504,33 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse + var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / value / - WriteObject((await response).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; + } + } } } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonFilePath.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonFilePath.cs new file mode 100644 index 000000000000..b65940a2ff21 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonFilePath.cs @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// Solution discovery using natural language processing. + /// + /// [OpenAPI] Post=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Post operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Post operation")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Post 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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonFilePath() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DiscoverySolutionNlpSubscriptionScopePost' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DiscoverySolutionNlpSubscriptionScopePostViaJsonString(SubscriptionId, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse + var result = (await response); + // response should be returning an array of some kind. +Pageable + // nested-array / value / + 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; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonString.cs similarity index 77% rename from generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonString.cs index 0da39ce9a0c4..afb83c899e91 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonString.cs @@ -6,19 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// Solution discovery using natural language processing. /// /// [OpenAPI] Post=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions" /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource))] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] - public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,25 +38,26 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostV /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - /// Discover NLP request. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest _discoverSolutionRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpRequest(); + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - /// Additional information in the form of a string. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Additional information in the form of a string.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Additional information in the form of a string.", - SerializedName = @"additionalContext", - PossibleTypes = new [] { typeof(string) })] - public string AdditionalContext { get => _discoverSolutionRequestBody.AdditionalContext ?? null; set => _discoverSolutionRequestBody.AdditionalContext = value; } + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -66,6 +71,9 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostV [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -78,27 +86,21 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostV [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - /// Describe the issue with the affected resource. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Describe the issue with the affected resource.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Post operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Post operation")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, + Required = true, ReadOnly = false, - Description = @"Describe the issue with the affected resource.", - SerializedName = @"issueSummary", + Description = @"Json string supplied to the Post operation", + SerializedName = @"JsonString", PossibleTypes = new [] { typeof(string) })] - public string IssueSummary { get => _discoverSolutionRequestBody.IssueSummary ?? null; set => _discoverSolutionRequestBody.IssueSummary = value; } + public string JsonString { get => this._jsonString; set => this._jsonString = value; } /// /// cancellation delegate. Stops the cmdlet when called. @@ -111,7 +113,7 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostV /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -129,54 +131,48 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostV [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - /// Provide resourceId of affected resource - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Provide resourceId of affected resource")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Provide resourceId of affected resource", - SerializedName = @"resourceId", - PossibleTypes = new [] { typeof(string) })] - public string ResourceId { get => _discoverSolutionRequestBody.ResourceId ?? null; set => _discoverSolutionRequestBody.ResourceId = value; } + /// Backing field for property. + private string _subscriptionId; - /// - /// Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP - /// Service Id is the GUID which can be found under name field in Services List response - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response")] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = false, + Required = true, ReadOnly = false, - Description = @"Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response", - SerializedName = @"serviceId", + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] - public string ServiceId { get => _discoverSolutionRequestBody.ServiceId ?? null; set => _discoverSolutionRequestBody.ServiceId = value; } + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + 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) @@ -199,6 +195,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -220,10 +221,10 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. /// - public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpanded() + public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaJsonString() { } @@ -272,8 +273,33 @@ public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentityExpa WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -329,7 +355,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -342,24 +368,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.DiscoverySolutionNlpSubscriptionScopePostViaIdentity(InputObject.Id, _discoverSolutionRequestBody, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DiscoverySolutionNlpSubscriptionScopePost(InputObject.SubscriptionId ?? null, _discoverSolutionRequestBody, onOk, onDefault, this, Pipeline); - } + await this.Client.DiscoverySolutionNlpSubscriptionScopePostViaJsonString(SubscriptionId, _jsonString, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_discoverSolutionRequestBody}) + 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 } }); @@ -397,12 +411,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -419,15 +433,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_discoverSolutionRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_discoverSolutionRequestBody }) + 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 } }); @@ -437,12 +451,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -454,9 +468,33 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse + var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / value / - WriteObject((await response).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; + } + } } } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post.cs index a5b6a52e0ae7..fdb01f9dec46 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// Solution discovery using natural language processing. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Post=>POST:"/providers/Microsoft.Help/discoverSolutions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpTenantScope_Post", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post : glob /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -53,7 +71,7 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post : glob public global::System.Management.Automation.PSObject DefaultProfile { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest _discoverSolutionRequest; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest _discoverSolutionRequest; /// Discover NLP request. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Discover NLP request.", ValueFromPipeline = true)] @@ -62,8 +80,12 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post : glob ReadOnly = false, Description = @"Discover NLP request.", SerializedName = @"discoverSolutionRequest", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest DiscoverSolutionRequest { get => this._discoverSolutionRequest; set => this._discoverSolutionRequest = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest DiscoverSolutionRequest { get => this._discoverSolutionRequest; set => this._discoverSolutionRequest = value; } + + /// 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")] @@ -91,7 +113,7 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post : glob /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -114,24 +136,24 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post : glob /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -154,6 +176,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -175,7 +202,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post() { @@ -226,8 +253,33 @@ public InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_Post() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -283,7 +335,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -301,7 +353,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=DiscoverSolutionRequest}) + 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 } }); @@ -339,12 +391,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -361,15 +413,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=DiscoverSolutionRequest }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=DiscoverSolutionRequest }) + 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 } }); @@ -379,12 +431,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -396,9 +448,33 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse + var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / value / - WriteObject((await response).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; + } + } } } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded.cs index d4b29e179cda..414a70b6be5d 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// Solution discovery using natural language processing. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Post=>POST:"/providers/Microsoft.Help/discoverSolutions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,7 +38,19 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpande private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Discover NLP request. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest _discoverSolutionRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiscoveryNlpRequest(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest _discoverSolutionRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiscoveryNlpRequest(); + + /// 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; /// Additional information in the form of a string. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Additional information in the form of a string.")] @@ -53,6 +68,9 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpande [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -66,6 +84,9 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpande [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -103,7 +124,7 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpande /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -133,15 +154,15 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpande public string ResourceId { get => _discoverSolutionRequestBody.ResourceId ?? null; set => _discoverSolutionRequestBody.ResourceId = value; } /// - /// Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP + /// Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP /// Service Id is the GUID which can be found under name field in Services List response /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response", + Description = @"Service Classification id for the resource. You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response", SerializedName = @"serviceId", PossibleTypes = new [] { typeof(string) })] public string ServiceId { get => _discoverSolutionRequestBody.ServiceId ?? null; set => _discoverSolutionRequestBody.ServiceId = value; } @@ -151,24 +172,24 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpande /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + 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) @@ -191,6 +212,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -212,7 +238,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded() { @@ -263,8 +289,33 @@ public InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostExpanded() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -320,7 +371,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -338,7 +389,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_discoverSolutionRequestBody}) + 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 } }); @@ -376,12 +427,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -398,15 +449,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_discoverSolutionRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_discoverSolutionRequestBody }) + 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 } }); @@ -416,12 +467,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -433,9 +484,33 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse + var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / value / - WriteObject((await response).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; + } + } } } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonFilePath.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonFilePath.cs new file mode 100644 index 000000000000..c04abae6ca94 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonFilePath.cs @@ -0,0 +1,484 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// Solution discovery using natural language processing. + /// + /// [OpenAPI] Post=>POST:"/providers/Microsoft.Help/discoverSolutions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Post operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Post operation")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Post 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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonFilePath() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DiscoverySolutionNlpTenantScopePost' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DiscoverySolutionNlpTenantScopePostViaJsonString(_jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse + var result = (await response); + // response should be returning an array of some kind. +Pageable + // nested-array / value / + 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; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonString.cs similarity index 78% rename from generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity.cs rename to generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonString.cs index 38e2964d51a4..4229a2be1ffb 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonString.cs @@ -6,19 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// Solution discovery using natural language processing. /// - /// [OpenAPI] Post=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions" + /// [OpenAPI] Post=>POST:"/providers/Microsoft.Help/discoverSolutions" /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource))] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Solution discovery using natural language processing.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] - public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/providers/Microsoft.Help/discoverSolutions", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +38,26 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostV /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -52,18 +71,8 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostV [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest _discoverSolutionRequest; - - /// Discover NLP request. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Discover NLP request.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Discover NLP request.", - SerializedName = @"discoverSolutionRequest", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest DiscoverSolutionRequest { get => this._discoverSolutionRequest; set => this._discoverSolutionRequest = value; } + /// 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")] @@ -77,17 +86,22 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostV [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Post operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Post operation")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Post operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -99,7 +113,7 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostV /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -122,24 +136,24 @@ public partial class InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostV /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + 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) @@ -162,6 +176,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -183,10 +202,10 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the - /// cmdlet class. + /// Initializes a new instance of the cmdlet + /// class. /// - public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity() + public InvokeAzSelfHelpDiscoverySolutionNlpTenantScope_PostViaJsonString() { } @@ -235,8 +254,33 @@ public InvokeAzSelfHelpDiscoverySolutionNlpSubscriptionScope_PostViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -253,7 +297,7 @@ protected override void ProcessRecord() try { // work - if (ShouldProcess($"Call remote 'DiscoverySolutionNlpSubscriptionScopePost' operation")) + if (ShouldProcess($"Call remote 'DiscoverySolutionNlpTenantScopePost' operation")) { using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) { @@ -292,7 +336,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,24 +349,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.DiscoverySolutionNlpSubscriptionScopePostViaIdentity(InputObject.Id, DiscoverSolutionRequest, onOk, onDefault, this, Pipeline); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.DiscoverySolutionNlpSubscriptionScopePost(InputObject.SubscriptionId ?? null, DiscoverSolutionRequest, onOk, onDefault, this, Pipeline); - } + await this.Client.DiscoverySolutionNlpTenantScopePostViaJsonString(_jsonString, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=DiscoverSolutionRequest}) + 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 } }); @@ -360,12 +392,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -382,15 +414,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=DiscoverSolutionRequest }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=DiscoverSolutionRequest }) + 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 } }); @@ -400,12 +432,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -417,9 +449,33 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse + var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / value / - WriteObject((await response).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; + } + } } } } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_Warm.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_Warm.cs index 73a641d4016b..465b76ed4406 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_Warm.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_Warm.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -20,7 +22,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpWarmSolutionUp_Warm : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_Warm : global::System.Manage /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_Warm : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 InvokeAzSelfHelpWarmSolutionUp_Warm : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -136,7 +157,7 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_Warm : global::System.Manage public string SolutionResourceName { get => this._solutionResourceName; set => this._solutionResourceName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody _solutionWarmUpRequestBody; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody _solutionWarmUpRequestBody; /// Solution WarmUpRequest body [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Solution WarmUpRequest body", ValueFromPipeline = true)] @@ -145,20 +166,21 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_Warm : global::System.Manage ReadOnly = false, Description = @"Solution WarmUpRequest body", SerializedName = @"solutionWarmUpRequestBody", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody SolutionWarmUpRequestBody { get => this._solutionWarmUpRequestBody; set => this._solutionWarmUpRequestBody = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody SolutionWarmUpRequestBody { get => this._solutionWarmUpRequestBody; set => this._solutionWarmUpRequestBody = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 @@ -191,6 +213,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -212,7 +239,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzSelfHelpWarmSolutionUp_Warm() { @@ -263,8 +290,33 @@ public InvokeAzSelfHelpWarmSolutionUp_Warm() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -320,7 +372,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -338,7 +390,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SolutionResourceName=SolutionResourceName,body=SolutionWarmUpRequestBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SolutionResourceName=SolutionResourceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -376,12 +428,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -398,15 +450,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SolutionResourceName=SolutionResourceName, body=SolutionWarmUpRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SolutionResourceName=SolutionResourceName, body=SolutionWarmUpRequestBody }) + 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 } }); diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmExpanded.cs index dbbe05e644b9..0029a806bf3e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -20,7 +22,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpWarmSolutionUp_WarmExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,14 +39,29 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmExpanded : global::Syste /// 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; + /// Solution WarmUpRequest body - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody _solutionWarmUpRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBody(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody _solutionWarmUpRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionWarmUpRequestBody(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -57,6 +75,9 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmExpanded : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -89,8 +110,8 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmExpanded : global::Syste ReadOnly = false, Description = @"Dictionary of ", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters Parameter { get => _solutionWarmUpRequestBody.Parameter ?? null /* object */; set => _solutionWarmUpRequestBody.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters Parameter { get => _solutionWarmUpRequestBody.Parameter ?? null /* object */; set => _solutionWarmUpRequestBody.Parameter = value; } /// /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. @@ -102,7 +123,7 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmExpanded : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -155,12 +176,12 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmExpanded : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 @@ -193,6 +214,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -214,7 +240,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzSelfHelpWarmSolutionUp_WarmExpanded() { @@ -265,8 +291,33 @@ public InvokeAzSelfHelpWarmSolutionUp_WarmExpanded() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -322,7 +373,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -340,7 +391,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SolutionResourceName=SolutionResourceName,body=_solutionWarmUpRequestBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SolutionResourceName=SolutionResourceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -378,12 +429,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -400,15 +451,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SolutionResourceName=SolutionResourceName, body=_solutionWarmUpRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SolutionResourceName=SolutionResourceName, body=_solutionWarmUpRequestBody }) + 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 } }); diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity.cs index be887a1bdf43..186fef86e93b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -20,7 +22,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity : global::Sy /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -95,7 +116,7 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity : global::Sy /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -114,7 +135,7 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity : global::Sy public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody _solutionWarmUpRequestBody; + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody _solutionWarmUpRequestBody; /// Solution WarmUpRequest body [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Solution WarmUpRequest body", ValueFromPipeline = true)] @@ -123,20 +144,21 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity : global::Sy ReadOnly = false, Description = @"Solution WarmUpRequest body", SerializedName = @"solutionWarmUpRequestBody", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody SolutionWarmUpRequestBody { get => this._solutionWarmUpRequestBody; set => this._solutionWarmUpRequestBody = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody SolutionWarmUpRequestBody { get => this._solutionWarmUpRequestBody; set => this._solutionWarmUpRequestBody = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 @@ -169,6 +191,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -190,7 +217,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity() { @@ -241,8 +268,33 @@ public InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -298,7 +350,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -332,7 +384,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=SolutionWarmUpRequestBody}) + 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 } }); @@ -370,12 +422,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 +444,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=SolutionWarmUpRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=SolutionWarmUpRequestBody }) + 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 } }); diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded.cs index c5333f8b925b..eeb5b29dfc27 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -20,7 +22,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup", ApiVersion = "2024-03-01-preview")] public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,14 +39,29 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded : gl /// 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; + /// Solution WarmUpRequest body - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody _solutionWarmUpRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionWarmUpRequestBody(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody _solutionWarmUpRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionWarmUpRequestBody(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter Break { get; set; } + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -57,6 +75,9 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded : gl [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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,8 +118,8 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded : gl ReadOnly = false, Description = @"Dictionary of ", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBodyParameters Parameter { get => _solutionWarmUpRequestBody.Parameter ?? null /* object */; set => _solutionWarmUpRequestBody.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBodyParameters Parameter { get => _solutionWarmUpRequestBody.Parameter ?? null /* object */; set => _solutionWarmUpRequestBody.Parameter = value; } /// /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. @@ -110,7 +131,7 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded : gl /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -133,12 +154,12 @@ public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded : gl /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 @@ -171,6 +192,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -192,7 +218,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded() { @@ -243,8 +269,33 @@ public InvokeAzSelfHelpWarmSolutionUp_WarmViaIdentityExpanded() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -300,7 +351,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -334,7 +385,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_solutionWarmUpRequestBody}) + 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 } }); @@ -372,12 +423,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -394,15 +445,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_solutionWarmUpRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_solutionWarmUpRequestBody }) + 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 } }); diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaJsonFilePath.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaJsonFilePath.cs new file mode 100644 index 000000000000..63161c41d273 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaJsonFilePath.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// Warm up the solution resource by preloading asynchronous diagnostics results into cache + /// + /// + /// [OpenAPI] WarmUp=>POST:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpWarmSolutionUp_WarmViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Warm up the solution resource by preloading asynchronous diagnostics results into cache")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Warm operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Warm operation")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Warm 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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// Backing field for property. + private string _solutionResourceName; + + /// Solution resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Solution resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Solution resource Name.", + SerializedName = @"solutionResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SolutionResourceName { get => this._solutionResourceName; set => this._solutionResourceName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzSelfHelpWarmSolutionUp_WarmViaJsonFilePath() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SolutionWarmUp' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SolutionWarmUpViaJsonString(Scope, SolutionResourceName, _jsonString, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SolutionResourceName=SolutionResourceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaJsonString.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaJsonString.cs new file mode 100644 index 000000000000..f7d6d252cdaf --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/InvokeAzSelfHelpWarmSolutionUp_WarmViaJsonString.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// Warm up the solution resource by preloading asynchronous diagnostics results into cache + /// + /// + /// [OpenAPI] WarmUp=>POST:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzSelfHelpWarmSolutionUp_WarmViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Warm up the solution resource by preloading asynchronous diagnostics results into cache")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class InvokeAzSelfHelpWarmSolutionUp_WarmViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Warm operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Warm operation")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Warm 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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// Backing field for property. + private string _solutionResourceName; + + /// Solution resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Solution resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Solution resource Name.", + SerializedName = @"solutionResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SolutionResourceName { get => this._solutionResourceName; set => this._solutionResourceName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzSelfHelpWarmSolutionUp_WarmViaJsonString() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SolutionWarmUp' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SolutionWarmUpViaJsonString(Scope, SolutionResourceName, _jsonString, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SolutionResourceName=SolutionResourceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateExpanded.cs index 9a98acd71feb..7ba22a2c6f1e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateExpanded.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// - /// Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics + /// create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics /// are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and /// the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed /// via ‘additionalParameters’ as an input to Diagnostics API. @@ -18,12 +20,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Create=>PUT:"/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSelfHelpDiagnostic_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.

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

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", ApiVersion = "2024-03-01-preview")] public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -40,7 +43,19 @@ public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Man private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Diagnostic resource - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource _diagnosticResourceRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.DiagnosticResource(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource _diagnosticResourceRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -52,6 +67,9 @@ public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -65,6 +83,9 @@ public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics /// results @@ -77,8 +98,8 @@ public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Man ReadOnly = false, Description = @"Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results", SerializedName = @"globalParameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => _diagnosticResourceRequestBody.GlobalParameter ?? null /* object */; set => _diagnosticResourceRequestBody.GlobalParameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => _diagnosticResourceRequestBody.GlobalParameter ?? null /* object */; set => _diagnosticResourceRequestBody.GlobalParameter = value; } /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] @@ -101,8 +122,8 @@ public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Man ReadOnly = false, Description = @"SolutionIds that are needed to be invoked.", SerializedName = @"insights", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] Insight { get => _diagnosticResourceRequestBody.Insight ?? null /* arrayOf */; set => _diagnosticResourceRequestBody.Insight = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation[] Insight { get => _diagnosticResourceRequestBody.Insight?.ToArray() ?? null /* fixedArrayOf */; set => _diagnosticResourceRequestBody.Insight = (value != null ? new System.Collections.Generic.List(value) : null); } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -126,7 +147,7 @@ public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Man /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -180,24 +201,24 @@ public partial class NewAzSelfHelpDiagnostic_CreateExpanded : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.IDiagnosticResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -243,6 +264,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpDiagnost /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -307,11 +333,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.SelfHelp.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.SelfHelp.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"); @@ -323,10 +374,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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -336,7 +403,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzSelfHelpDiagnostic_CreateExpanded() { @@ -402,7 +469,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -415,12 +482,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DiagnosticsCreate(Scope, SResourceName, _diagnosticResourceRequestBody, onOk, onDefault, this, Pipeline); + await this.Client.DiagnosticsCreate(Scope, SResourceName, _diagnosticResourceRequestBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName,body=_diagnosticResourceRequestBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -458,12 +525,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -480,15 +547,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SResourceName=SResourceName, body=_diagnosticResourceRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SResourceName=SResourceName, body=_diagnosticResourceRequestBody }) + 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 } }); @@ -498,12 +565,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -515,8 +582,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateViaIdentityExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateViaIdentityExpanded.cs new file mode 100644 index 000000000000..c785cb7a57ac --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateViaIdentityExpanded.cs @@ -0,0 +1,599 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics + /// are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and + /// the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘additionalParameters’ as an input to Diagnostics API. + ///
+ /// + /// [OpenAPI] Create=>PUT:"/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSelfHelpDiagnostic_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", ApiVersion = "2024-03-01-preview")] + public partial class NewAzSelfHelpDiagnostic_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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(); + + /// Diagnostic resource + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource _diagnosticResourceRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.DiagnosticResource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// + /// Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics + /// results + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Global parameters is an optional map which can be used to add key and value to request body to improve the diagnostics results", + SerializedName = @"globalParameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResourcePropertiesGlobalParameters GlobalParameter { get => _diagnosticResourceRequestBody.GlobalParameter ?? null /* object */; set => _diagnosticResourceRequestBody.GlobalParameter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// SolutionIds that are needed to be invoked. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "SolutionIds that are needed to be invoked.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SolutionIds that are needed to be invoked.", + SerializedName = @"insights", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation[] Insight { get => _diagnosticResourceRequestBody.Insight?.ToArray() ?? null /* fixedArrayOf */; set => _diagnosticResourceRequestBody.Insight = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSelfHelpDiagnostic_CreateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpDiagnostic_CreateViaIdentityExpanded Clone() + { + var clone = new NewAzSelfHelpDiagnostic_CreateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._diagnosticResourceRequestBody = this._diagnosticResourceRequestBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSelfHelpDiagnostic_CreateViaIdentityExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DiagnosticsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DiagnosticsCreateViaIdentity(InputObject.Id, _diagnosticResourceRequestBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.Scope) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Scope"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DiagnosticsResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DiagnosticsResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DiagnosticsCreate(InputObject.Scope ?? null, InputObject.DiagnosticsResourceName ?? null, _diagnosticResourceRequestBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateViaJsonFilePath.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..fc6c2fda154d --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateViaJsonFilePath.cs @@ -0,0 +1,594 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics + /// are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and + /// the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘additionalParameters’ as an input to Diagnostics API. + ///
+ /// + /// [OpenAPI] Create=>PUT:"/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSelfHelpDiagnostic_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class NewAzSelfHelpDiagnostic_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// 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.SelfHelp.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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _sResourceName; + + /// Unique resource name for insight resources + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Unique resource name for insight resources")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Unique resource name for insight resources", + SerializedName = @"diagnosticsResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DiagnosticsResourceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SResourceName { get => this._sResourceName; set => this._sResourceName = value; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSelfHelpDiagnostic_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpDiagnostic_CreateViaJsonFilePath Clone() + { + var clone = new NewAzSelfHelpDiagnostic_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Scope = this.Scope; + clone.SResourceName = this.SResourceName; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSelfHelpDiagnostic_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DiagnosticsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DiagnosticsCreateViaJsonString(Scope, SResourceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateViaJsonString.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateViaJsonString.cs new file mode 100644 index 000000000000..ff7cf7a10ae9 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpDiagnostic_CreateViaJsonString.cs @@ -0,0 +1,592 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics + /// are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and + /// the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed + /// via ‘additionalParameters’ as an input to Diagnostics API. + ///
+ /// + /// [OpenAPI] Create=>PUT:"/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSelfHelpDiagnostic_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions.
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.

Note: ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/diagnostics/{diagnosticsResourceName}", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class NewAzSelfHelpDiagnostic_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// 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.SelfHelp.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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _sResourceName; + + /// Unique resource name for insight resources + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Unique resource name for insight resources")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Unique resource name for insight resources", + SerializedName = @"diagnosticsResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DiagnosticsResourceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SResourceName { get => this._sResourceName; set => this._sResourceName = value; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSelfHelpDiagnostic_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpDiagnostic_CreateViaJsonString Clone() + { + var clone = new NewAzSelfHelpDiagnostic_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Scope = this.Scope; + clone.SResourceName = this.SResourceName; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSelfHelpDiagnostic_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DiagnosticsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DiagnosticsCreateViaJsonString(Scope, SResourceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateExpanded.cs index 7f5219add7b5..7df60d6a823e 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateExpanded.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// - /// Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ + /// create a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might /// fail execution, and you might see an empty response.

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

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API.
")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"create a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response.

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API.
")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", ApiVersion = "2024-03-01-preview")] public partial class NewAzSelfHelpSimplifiedSolution_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -39,8 +42,20 @@ public partial class NewAzSelfHelpSimplifiedSolution_CreateExpanded : global::Sy ///
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; + /// Simplified Solutions response. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource _simplifiedSolutionsRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SimplifiedSolutionsResource(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource _simplifiedSolutionsRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResource(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -52,6 +67,9 @@ public partial class NewAzSelfHelpSimplifiedSolution_CreateExpanded : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -65,6 +83,9 @@ public partial class NewAzSelfHelpSimplifiedSolution_CreateExpanded : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -105,13 +126,13 @@ public partial class NewAzSelfHelpSimplifiedSolution_CreateExpanded : global::Sy ReadOnly = false, Description = @"Client input parameters to run Simplified Solutions", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get => _simplifiedSolutionsRequestBody.Parameter ?? null /* object */; set => _simplifiedSolutionsRequestBody.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get => _simplifiedSolutionsRequestBody.Parameter ?? null /* object */; set => _simplifiedSolutionsRequestBody.Parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -176,24 +197,24 @@ public partial class NewAzSelfHelpSimplifiedSolution_CreateExpanded : global::Sy /// happens on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + 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) @@ -239,6 +260,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpSimplifi /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -303,11 +329,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.SelfHelp.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.SelfHelp.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"); @@ -319,10 +370,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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -332,7 +399,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzSelfHelpSimplifiedSolution_CreateExpanded() { @@ -398,7 +465,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -411,12 +478,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SimplifiedSolutionsCreate(Scope, SResourceName, _simplifiedSolutionsRequestBody, onOk, onDefault, this, Pipeline); + await this.Client.SimplifiedSolutionsCreate(Scope, SResourceName, _simplifiedSolutionsRequestBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName,body=_simplifiedSolutionsRequestBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -454,12 +521,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -476,15 +543,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SResourceName=SResourceName, body=_simplifiedSolutionsRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, SResourceName=SResourceName, body=_simplifiedSolutionsRequestBody }) + 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 } }); @@ -494,12 +561,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -511,8 +578,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateViaIdentityExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateViaIdentityExpanded.cs new file mode 100644 index 000000000000..eacb17538ab7 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateViaIdentityExpanded.cs @@ -0,0 +1,597 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// create a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ + /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might + /// fail execution, and you might see an empty response.

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

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API.
")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", ApiVersion = "2024-03-01-preview")] + public partial class NewAzSelfHelpSimplifiedSolution_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; + + /// Simplified Solutions response. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource _simplifiedSolutionsRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SimplifiedSolutionsResource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Client input parameters to run Simplified Solutions + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Client input parameters to run Simplified Solutions")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client input parameters to run Simplified Solutions", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResourcePropertiesParameters Parameter { get => _simplifiedSolutionsRequestBody.Parameter ?? null /* object */; set => _simplifiedSolutionsRequestBody.Parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Solution Id to identify single Simplified Solution. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution Id to identify single Simplified Solution.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Solution Id to identify single Simplified Solution.", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + public string SolutionId { get => _simplifiedSolutionsRequestBody.SolutionId ?? null; set => _simplifiedSolutionsRequestBody.SolutionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzSelfHelpSimplifiedSolution_CreateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpSimplifiedSolution_CreateViaIdentityExpanded Clone() + { + var clone = new NewAzSelfHelpSimplifiedSolution_CreateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._simplifiedSolutionsRequestBody = this._simplifiedSolutionsRequestBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSelfHelpSimplifiedSolution_CreateViaIdentityExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SimplifiedSolutionsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SimplifiedSolutionsCreateViaIdentity(InputObject.Id, _simplifiedSolutionsRequestBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.Scope) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Scope"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SimplifiedSolutionsResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SimplifiedSolutionsResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SimplifiedSolutionsCreate(InputObject.Scope ?? null, InputObject.SimplifiedSolutionsResourceName ?? null, _simplifiedSolutionsRequestBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateViaJsonFilePath.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..df2bc149c0ac --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateViaJsonFilePath.cs @@ -0,0 +1,594 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// create a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ + /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might + /// fail execution, and you might see an empty response.

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

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API.
")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class NewAzSelfHelpSimplifiedSolution_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// 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.SelfHelp.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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _sResourceName; + + /// Simplified Solutions Resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Simplified Solutions Resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Simplified Solutions Resource Name.", + SerializedName = @"simplifiedSolutionsResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SimplifiedSolutionsResourceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SResourceName { get => this._sResourceName; set => this._sResourceName = value; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSelfHelpSimplifiedSolution_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpSimplifiedSolution_CreateViaJsonFilePath Clone() + { + var clone = new NewAzSelfHelpSimplifiedSolution_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Scope = this.Scope; + clone.SResourceName = this.SResourceName; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSelfHelpSimplifiedSolution_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SimplifiedSolutionsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SimplifiedSolutionsCreateViaJsonString(Scope, SResourceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateViaJsonString.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateViaJsonString.cs new file mode 100644 index 000000000000..aab2c87f2e51 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSimplifiedSolution_CreateViaJsonString.cs @@ -0,0 +1,592 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// create a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ + /// from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might + /// fail execution, and you might see an empty response.

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

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API.
")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/simplifiedSolutions/{simplifiedSolutionsResourceName}", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class NewAzSelfHelpSimplifiedSolution_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// 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.SelfHelp.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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _sResourceName; + + /// Simplified Solutions Resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Simplified Solutions Resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Simplified Solutions Resource Name.", + SerializedName = @"simplifiedSolutionsResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SimplifiedSolutionsResourceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string SResourceName { get => this._sResourceName; set => this._sResourceName = value; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSelfHelpSimplifiedSolution_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpSimplifiedSolution_CreateViaJsonString Clone() + { + var clone = new NewAzSelfHelpSimplifiedSolution_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Scope = this.Scope; + clone.SResourceName = this.SResourceName; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSelfHelpSimplifiedSolution_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SimplifiedSolutionsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SimplifiedSolutionsCreateViaJsonString(Scope, SResourceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,SResourceName=SResourceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateExpanded.cs index 17351a561664..53ca89ed9444 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateExpanded.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// - /// Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from + /// create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional @@ -26,12 +28,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Create=>PUT:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSelfHelpSolution_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might see an empty response.

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

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] public partial class NewAzSelfHelpSolution_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -47,8 +50,20 @@ public partial class NewAzSelfHelpSolution_CreateExpanded : 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; + /// Solution response. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource _solutionRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionResource(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource _solutionRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResource(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -60,6 +75,9 @@ public partial class NewAzSelfHelpSolution_CreateExpanded : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -73,6 +91,9 @@ public partial class NewAzSelfHelpSolution_CreateExpanded : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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,13 +134,13 @@ public partial class NewAzSelfHelpSolution_CreateExpanded : global::System.Manag ReadOnly = false, Description = @"Client input parameters to run Solution", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get => _solutionRequestBody.Parameter ?? null /* object */; set => _solutionRequestBody.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters Parameter { get => _solutionRequestBody.Parameter ?? null /* object */; set => _solutionRequestBody.Parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -177,32 +198,32 @@ public partial class NewAzSelfHelpSolution_CreateExpanded : global::System.Manag ReadOnly = false, Description = @"Solution request trigger criteria", SerializedName = @"triggerCriteria", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get => _solutionRequestBody.TriggerCriterion ?? null /* arrayOf */; set => _solutionRequestBody.TriggerCriterion = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion[] TriggerCriterion { get => _solutionRequestBody.TriggerCriterion?.ToArray() ?? null /* fixedArrayOf */; set => _solutionRequestBody.TriggerCriterion = (value != null ? new System.Collections.Generic.List(value) : null); } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -248,6 +269,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpSolution /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -312,11 +338,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.SelfHelp.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.SelfHelp.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"); @@ -328,10 +379,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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -341,7 +408,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzSelfHelpSolution_CreateExpanded() { @@ -407,7 +474,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -420,12 +487,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SolutionCreate(Scope, ResourceName, _solutionRequestBody, onOk, onDefault, this, Pipeline); + await this.Client.SolutionCreate(Scope, ResourceName, _solutionRequestBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,ResourceName=ResourceName,body=_solutionRequestBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,ResourceName=ResourceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -463,12 +530,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -485,15 +552,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, ResourceName=ResourceName, body=_solutionRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, ResourceName=ResourceName, body=_solutionRequestBody }) + 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 } }); @@ -503,12 +570,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -520,8 +587,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateViaIdentityExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateViaIdentityExpanded.cs new file mode 100644 index 000000000000..69e2f7b85732 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateViaIdentityExpanded.cs @@ -0,0 +1,604 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from + /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully + /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) + /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional + /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. + /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. + /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. + /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might + /// see an empty response.

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

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] + public partial class NewAzSelfHelpSolution_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; + + /// Solution response. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource _solutionRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionResource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Client input parameters to run Solution + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Client input parameters to run Solution")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client input parameters to run Solution", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters Parameter { get => _solutionRequestBody.Parameter ?? null /* object */; set => _solutionRequestBody.Parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Solution request trigger criteria + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution request trigger criteria")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Solution request trigger criteria", + SerializedName = @"triggerCriteria", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion[] TriggerCriterion { get => _solutionRequestBody.TriggerCriterion?.ToArray() ?? null /* fixedArrayOf */; set => _solutionRequestBody.TriggerCriterion = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSelfHelpSolution_CreateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpSolution_CreateViaIdentityExpanded Clone() + { + var clone = new NewAzSelfHelpSolution_CreateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._solutionRequestBody = this._solutionRequestBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSelfHelpSolution_CreateViaIdentityExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SolutionCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SolutionCreateViaIdentity(InputObject.Id, _solutionRequestBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.Scope) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Scope"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SolutionResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SolutionResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SolutionCreate(InputObject.Scope ?? null, InputObject.SolutionResourceName ?? null, _solutionRequestBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateViaJsonFilePath.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..56f6b18f9a6f --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateViaJsonFilePath.cs @@ -0,0 +1,602 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from + /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully + /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) + /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional + /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. + /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. + /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. + /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might + /// see an empty response.

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

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class NewAzSelfHelpSolution_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// 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.SelfHelp.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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceName; + + /// Solution resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Solution resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Solution resource Name.", + SerializedName = @"solutionResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SolutionResourceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSelfHelpSolution_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpSolution_CreateViaJsonFilePath Clone() + { + var clone = new NewAzSelfHelpSolution_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Scope = this.Scope; + clone.ResourceName = this.ResourceName; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSelfHelpSolution_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SolutionCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SolutionCreateViaJsonString(Scope, ResourceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,ResourceName=ResourceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateViaJsonString.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateViaJsonString.cs new file mode 100644 index 000000000000..0accc06302d7 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpSolution_CreateViaJsonString.cs @@ -0,0 +1,600 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from + /// discovery solutions.
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully + /// curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) + /// dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional + /// video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. + /// All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. + /// Each solution type may require one or more ‘requiredParameters’ that are required to execute the individual solution component. + /// In the absence of the ‘requiredParameters’ it is likely that some of the solutions might fail execution, and you might + /// see an empty response.

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

Note:
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of Solutions API.
2. ‘requiredParameters’ from the Solutions response is the same as ‘ additionalParameters’ in the request for diagnostics
3. ‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class NewAzSelfHelpSolution_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// 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.SelfHelp.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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceName; + + /// Solution resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Solution resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Solution resource Name.", + SerializedName = @"solutionResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SolutionResourceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzSelfHelpSolution_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.NewAzSelfHelpSolution_CreateViaJsonString Clone() + { + var clone = new NewAzSelfHelpSolution_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Scope = this.Scope; + clone.ResourceName = this.ResourceName; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSelfHelpSolution_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SolutionCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SolutionCreateViaJsonString(Scope, ResourceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,ResourceName=ResourceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateExpanded.cs index b697f37ce05c..30c20bc772cf 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateExpanded.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// - /// Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ + /// create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ /// as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed /// problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow /// represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows @@ -21,12 +23,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Create=>PUT:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSelfHelpTroubleshooter_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", ApiVersion = "2024-03-01-preview")] public partial class NewAzSelfHelpTroubleshooter_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -43,13 +46,28 @@ public partial class NewAzSelfHelpTroubleshooter_CreateExpanded : global::System private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Troubleshooter response. - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource _createTroubleshooterRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.TroubleshooterResource(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource _createTroubleshooterRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResource(); + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -63,6 +81,9 @@ public partial class NewAzSelfHelpTroubleshooter_CreateExpanded : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -110,13 +131,13 @@ public partial class NewAzSelfHelpTroubleshooter_CreateExpanded : global::System ReadOnly = false, Description = @"Client input parameters to run Troubleshooter Resource", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterInstancePropertiesParameters Parameter { get => _createTroubleshooterRequestBody.Parameter ?? null /* object */; set => _createTroubleshooterRequestBody.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters Parameter { get => _createTroubleshooterRequestBody.Parameter ?? null /* object */; set => _createTroubleshooterRequestBody.Parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -166,36 +187,36 @@ public partial class NewAzSelfHelpTroubleshooter_CreateExpanded : global::System /// happens on that response. Implement this method in a partial class to enable this behavior ///
/// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -218,6 +239,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -282,8 +308,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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -293,7 +344,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzSelfHelpTroubleshooter_CreateExpanded() { @@ -347,7 +398,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -360,12 +411,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.TroubleshootersCreate(Scope, Name, _createTroubleshooterRequestBody, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.TroubleshootersCreate(Scope, Name, _createTroubleshooterRequestBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,Name=Name,body=_createTroubleshooterRequestBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -401,12 +452,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.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,8 +469,26 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + 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; + } + } } } @@ -427,12 +496,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -449,15 +518,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, Name=Name, body=_createTroubleshooterRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, Name=Name, body=_createTroubleshooterRequestBody }) + 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 } }); @@ -467,12 +536,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -484,8 +553,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateViaIdentityExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateViaIdentityExpanded.cs new file mode 100644 index 000000000000..899d93d5ee79 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateViaIdentityExpanded.cs @@ -0,0 +1,572 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ + /// as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed + /// problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow + /// represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows + /// are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous + /// support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend + /// signals and customer manual selections. + ///
+ /// + /// [OpenAPI] Create=>PUT:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSelfHelpTroubleshooter_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", ApiVersion = "2024-03-01-preview")] + public partial class NewAzSelfHelpTroubleshooter_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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(); + + /// Troubleshooter response. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource _createTroubleshooterRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.TroubleshooterResource(); + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Client input parameters to run Troubleshooter Resource + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Client input parameters to run Troubleshooter Resource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client input parameters to run Troubleshooter Resource", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterInstancePropertiesParameters Parameter { get => _createTroubleshooterRequestBody.Parameter ?? null /* object */; set => _createTroubleshooterRequestBody.Parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Solution Id to identify single troubleshooter. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Solution Id to identify single troubleshooter.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Solution Id to identify single troubleshooter.", + SerializedName = @"solutionId", + PossibleTypes = new [] { typeof(string) })] + public string SolutionId { get => _createTroubleshooterRequestBody.SolutionId ?? null; set => _createTroubleshooterRequestBody.SolutionId = 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.SelfHelp.Models.ITroubleshooterResource + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSelfHelpTroubleshooter_CreateViaIdentityExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TroubleshootersCreate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.TroubleshootersCreateViaIdentity(InputObject.Id, _createTroubleshooterRequestBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.Scope) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Scope"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.TroubleshooterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.TroubleshooterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.TroubleshootersCreate(InputObject.Scope ?? null, InputObject.TroubleshooterName ?? null, _createTroubleshooterRequestBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + 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.SelfHelp.Models.ITroubleshooterResource + 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.SelfHelp.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.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateViaJsonFilePath.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..6ff89dc40ff8 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateViaJsonFilePath.cs @@ -0,0 +1,569 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ + /// as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed + /// problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow + /// represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows + /// are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous + /// support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend + /// signals and customer manual selections. + ///
+ /// + /// [OpenAPI] Create=>PUT:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSelfHelpTroubleshooter_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class NewAzSelfHelpTroubleshooter_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// 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.SelfHelp.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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Troubleshooter resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Troubleshooter resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Troubleshooter resource Name.", + SerializedName = @"troubleshooterName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TroubleshooterName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// + /// 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.SelfHelp.Models.ITroubleshooterResource + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSelfHelpTroubleshooter_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TroubleshootersCreate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TroubleshootersCreateViaJsonString(Scope, Name, _jsonString, onOk, onCreated, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + 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.SelfHelp.Models.ITroubleshooterResource + 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.SelfHelp.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.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateViaJsonString.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateViaJsonString.cs new file mode 100644 index 000000000000..fc424e5ec7c1 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/NewAzSelfHelpTroubleshooter_CreateViaJsonString.cs @@ -0,0 +1,567 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ + /// as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed + /// problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow + /// represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows + /// are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous + /// support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend + /// signals and customer manual selections. + ///
+ /// + /// [OpenAPI] Create=>PUT:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzSelfHelpTroubleshooter_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger.
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. Troubleshooters terminate at a well curated solution based off of resource backend signals and customer manual selections.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class NewAzSelfHelpTroubleshooter_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// 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.SelfHelp.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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Troubleshooter resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Troubleshooter resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Troubleshooter resource Name.", + SerializedName = @"troubleshooterName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TroubleshooterName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// + /// 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.SelfHelp.Models.ITroubleshooterResource + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzSelfHelpTroubleshooter_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TroubleshootersCreate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TroubleshootersCreateViaJsonString(Scope, Name, _jsonString, onOk, onCreated, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + 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.SelfHelp.Models.ITroubleshooterResource + 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.SelfHelp.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.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_Restart.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_Restart.cs index 8ab99bc92914..7a081acb0827 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_Restart.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_Restart.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Restart=>POST:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/restart" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Restart, @"AzSelfHelpTroubleshooter_Restart", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Restarts the troubleshooter API using applicable troubleshooter resource name as the input.
It returns new resource name which should be used in subsequent request. The old resource name is obsolete after this API is invoked.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/restart", ApiVersion = "2024-03-01-preview")] public partial class RestartAzSelfHelpTroubleshooter_Restart : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class RestartAzSelfHelpTroubleshooter_Restart : global::System.Ma ///
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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class RestartAzSelfHelpTroubleshooter_Restart : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -96,7 +117,7 @@ public partial class RestartAzSelfHelpTroubleshooter_Restart : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -135,24 +156,24 @@ public partial class RestartAzSelfHelpTroubleshooter_Restart : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -175,6 +196,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -239,8 +265,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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -296,7 +347,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -314,7 +365,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -327,7 +378,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RestartAzSelfHelpTroubleshooter_Restart() { @@ -360,12 +411,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -382,15 +433,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, 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 } }); @@ -400,12 +451,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -417,8 +468,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_RestartViaIdentity.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_RestartViaIdentity.cs index 3ac8b3b97b17..996e9d827693 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_RestartViaIdentity.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/RestartAzSelfHelpTroubleshooter_RestartViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets /// [OpenAPI] Restart=>POST:"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/restart" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Restart, @"AzSelfHelpTroubleshooter_RestartViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Restarts the troubleshooter API using applicable troubleshooter resource name as the input.
It returns new resource name which should be used in subsequent request. The old resource name is obsolete after this API is invoked.")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/restart", ApiVersion = "2024-03-01-preview")] public partial class RestartAzSelfHelpTroubleshooter_RestartViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class RestartAzSelfHelpTroubleshooter_RestartViaIdentity : global ///
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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class RestartAzSelfHelpTroubleshooter_RestartViaIdentity : global [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -89,7 +110,7 @@ public partial class RestartAzSelfHelpTroubleshooter_RestartViaIdentity : global /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -112,24 +133,24 @@ public partial class RestartAzSelfHelpTroubleshooter_RestartViaIdentity : global /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -152,6 +173,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -216,8 +242,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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -273,7 +324,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -307,7 +358,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -320,7 +371,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RestartAzSelfHelpTroubleshooter_RestartViaIdentity() { @@ -353,12 +404,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -375,7 +426,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.SelfHelp.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -393,12 +444,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,8 +461,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_End.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_End.cs index c1163a536a20..3873eea8479a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_End.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_End.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// Ends the troubleshooter action @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/end", ApiVersion = "2024-03-01-preview")] public partial class StopAzSelfHelpTroubleshooter_End : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class StopAzSelfHelpTroubleshooter_End : global::System.Managemen /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class StopAzSelfHelpTroubleshooter_End : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -100,7 +121,7 @@ public partial class StopAzSelfHelpTroubleshooter_End : global::System.Managemen /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -139,12 +160,12 @@ public partial class StopAzSelfHelpTroubleshooter_End : global::System.Managemen /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 @@ -179,6 +200,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -243,8 +269,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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -300,7 +351,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -318,7 +369,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -331,7 +382,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StopAzSelfHelpTroubleshooter_End() { @@ -364,12 +415,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -386,15 +437,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.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, 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 } }); diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_EndViaIdentity.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_EndViaIdentity.cs index de1ac7bc5442..d9a31572ced9 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_EndViaIdentity.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/StopAzSelfHelpTroubleshooter_EndViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// Ends the troubleshooter action @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/end", ApiVersion = "2024-03-01-preview")] public partial class StopAzSelfHelpTroubleshooter_EndViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class StopAzSelfHelpTroubleshooter_EndViaIdentity : global::Syste /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class StopAzSelfHelpTroubleshooter_EndViaIdentity : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -93,7 +114,7 @@ public partial class StopAzSelfHelpTroubleshooter_EndViaIdentity : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -116,12 +137,12 @@ public partial class StopAzSelfHelpTroubleshooter_EndViaIdentity : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 @@ -156,6 +177,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.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -220,8 +246,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.SelfHelp.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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +328,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -311,7 +362,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -324,7 +375,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StopAzSelfHelpTroubleshooter_EndViaIdentity() { @@ -357,12 +408,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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -379,7 +430,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.SelfHelp.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateExpanded.cs index 037c71e91457..bc8ae1096987 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// - /// Update the requiredInputs or additional information needed to execute the solution + /// update the requiredInputs or additional information needed to execute the solution /// /// /// [OpenAPI] Update=>PATCH:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSelfHelpSolution_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Update the requiredInputs or additional information needed to execute the solution ")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"update the requiredInputs or additional information needed to execute the solution ")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,20 @@ public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Ma /// 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; + /// Solution PatchRequest body - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody _solutionPatchRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionPatchRequestBody(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody _solutionPatchRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionPatchRequestBody(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -49,6 +64,9 @@ public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -62,6 +80,9 @@ public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -102,13 +123,13 @@ public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"Client input parameters to run Solution", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get => _solutionPatchRequestBody.Parameter ?? null /* object */; set => _solutionPatchRequestBody.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters Parameter { get => _solutionPatchRequestBody.Parameter ?? null /* object */; set => _solutionPatchRequestBody.Parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -166,32 +187,32 @@ public partial class UpdateAzSelfHelpSolution_UpdateExpanded : global::System.Ma ReadOnly = false, Description = @"Solution request trigger criteria", SerializedName = @"triggerCriteria", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get => _solutionPatchRequestBody.TriggerCriterion ?? null /* arrayOf */; set => _solutionPatchRequestBody.TriggerCriterion = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion[] TriggerCriterion { get => _solutionPatchRequestBody.TriggerCriterion?.ToArray() ?? null /* fixedArrayOf */; set => _solutionPatchRequestBody.TriggerCriterion = (value != null ? new System.Collections.Generic.List(value) : null); } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -237,6 +258,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.UpdateAzSelfHelpSolut /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -301,11 +327,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.SelfHelp.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.SelfHelp.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"); @@ -317,10 +368,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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -388,7 +455,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -401,12 +468,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SolutionUpdate(Scope, ResourceName, _solutionPatchRequestBody, onOk, onDefault, this, Pipeline); + await this.Client.SolutionUpdate(Scope, ResourceName, _solutionPatchRequestBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,ResourceName=ResourceName,body=_solutionPatchRequestBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,ResourceName=ResourceName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -426,7 +493,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzSelfHelpSolution_UpdateExpanded() { @@ -452,12 +519,12 @@ public UpdateAzSelfHelpSolution_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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -474,15 +541,15 @@ public UpdateAzSelfHelpSolution_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, ResourceName=ResourceName, body=_solutionPatchRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope, ResourceName=ResourceName, body=_solutionPatchRequestBody }) + 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 } }); @@ -492,12 +559,12 @@ public UpdateAzSelfHelpSolution_UpdateExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -509,8 +576,26 @@ public UpdateAzSelfHelpSolution_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded.cs index c8c21b504395..12bc771ab255 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; using System; /// - /// Update the requiredInputs or additional information needed to execute the solution + /// update the requiredInputs or additional information needed to execute the solution /// /// /// [OpenAPI] Update=>PATCH:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSelfHelpSolution_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"Update the requiredInputs or additional information needed to execute the solution ")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"update the requiredInputs or additional information needed to execute the solution ")] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] public partial class UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,20 @@ public partial class UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded : global /// 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; + /// Solution PatchRequest body - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionPatchRequestBody _solutionPatchRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.SolutionPatchRequestBody(); + private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionPatchRequestBody _solutionPatchRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.SolutionPatchRequestBody(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -49,6 +64,9 @@ public partial class UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; @@ -62,6 +80,9 @@ public partial class UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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] @@ -110,13 +131,13 @@ public partial class UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded : global ReadOnly = false, Description = @"Client input parameters to run Solution", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourcePropertiesParameters Parameter { get => _solutionPatchRequestBody.Parameter ?? null /* object */; set => _solutionPatchRequestBody.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourcePropertiesParameters Parameter { get => _solutionPatchRequestBody.Parameter ?? null /* object */; set => _solutionPatchRequestBody.Parameter = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -143,32 +164,32 @@ public partial class UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded : global ReadOnly = false, Description = @"Solution request trigger criteria", SerializedName = @"triggerCriteria", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion) })] - public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] TriggerCriterion { get => _solutionPatchRequestBody.TriggerCriterion ?? null /* arrayOf */; set => _solutionPatchRequestBody.TriggerCriterion = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion) })] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion[] TriggerCriterion { get => _solutionPatchRequestBody.TriggerCriterion?.ToArray() ?? null /* fixedArrayOf */; set => _solutionPatchRequestBody.TriggerCriterion = (value != null ? new System.Collections.Generic.List(value) : null); } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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.SelfHelp.Models.Api20240301Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -212,6 +233,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.UpdateAzSelfHelpSolut /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -276,11 +302,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.SelfHelp.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.SelfHelp.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"); @@ -292,10 +343,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.SelfHelp.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -363,7 +430,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -378,7 +445,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.SolutionUpdateViaIdentity(InputObject.Id, _solutionPatchRequestBody, onOk, onDefault, this, Pipeline); + await this.Client.SolutionUpdateViaIdentity(InputObject.Id, _solutionPatchRequestBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate); } else { @@ -391,13 +458,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SolutionResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.SolutionUpdate(InputObject.Scope ?? null, InputObject.SolutionResourceName ?? null, _solutionPatchRequestBody, onOk, onDefault, this, Pipeline); + await this.Client.SolutionUpdate(InputObject.Scope ?? null, InputObject.SolutionResourceName ?? null, _solutionPatchRequestBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_solutionPatchRequestBody}) + 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 } }); @@ -417,7 +484,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded() { @@ -443,12 +510,12 @@ public UpdateAzSelfHelpSolution_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.SelfHelp.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 ) { @@ -465,15 +532,15 @@ public UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_solutionPatchRequestBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_solutionPatchRequestBody }) + 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 } }); @@ -483,12 +550,12 @@ public UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -500,8 +567,26 @@ public UpdateAzSelfHelpSolution_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaJsonFilePath.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..6cf909c99669 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaJsonFilePath.cs @@ -0,0 +1,591 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// update the requiredInputs or additional information needed to execute the solution + /// + /// + /// [OpenAPI] Update=>PATCH:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSelfHelpSolution_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"update the requiredInputs or additional information needed to execute the solution ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class UpdateAzSelfHelpSolution_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// 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.SelfHelp.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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceName; + + /// Solution resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Solution resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Solution resource Name.", + SerializedName = @"solutionResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SolutionResourceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSelfHelpSolution_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.UpdateAzSelfHelpSolution_UpdateViaJsonFilePath Clone() + { + var clone = new UpdateAzSelfHelpSolution_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Scope = this.Scope; + clone.ResourceName = this.ResourceName; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SolutionUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SolutionUpdateViaJsonString(Scope, ResourceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,ResourceName=ResourceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSelfHelpSolution_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + 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/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaJsonString.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaJsonString.cs new file mode 100644 index 000000000000..84030ef17bc5 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/cmdlets/UpdateAzSelfHelpSolution_UpdateViaJsonString.cs @@ -0,0 +1,589 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Cmdlets; + using System; + + /// + /// update the requiredInputs or additional information needed to execute the solution + /// + /// + /// [OpenAPI] Update=>PATCH:"/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzSelfHelpSolution_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Description(@"update the requiredInputs or additional information needed to execute the solution ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.HttpPath(Path = "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}", ApiVersion = "2024-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.NotSuggestDefaultParameterSet] + public partial class UpdateAzSelfHelpSolution_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// 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.SelfHelp.SelfHelp Client => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// 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.SelfHelp.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.SelfHelp.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceName; + + /// Solution resource Name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Solution resource Name.")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Solution resource Name.", + SerializedName = @"solutionResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SolutionResourceName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string ResourceName { get => this._resourceName; set => this._resourceName = value; } + + /// Backing field for property. + private string _scope; + + /// + /// scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read + ///
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ")] + [Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"scope = resourceUri of affected resource.
For example: /subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read ", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Category(global::Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.ParameterCategory.Path)] + public string Scope { get => this._scope; set => this._scope = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzSelfHelpSolution_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Cmdlets.UpdateAzSelfHelpSolution_UpdateViaJsonString Clone() + { + var clone = new UpdateAzSelfHelpSolution_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Scope = this.Scope; + clone.ResourceName = this.ResourceName; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.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.SelfHelp.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SolutionUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SolutionUpdateViaJsonString(Scope, ResourceName, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope,ResourceName=ResourceName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzSelfHelpSolution_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource + 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/SelfHelp/SelfHelp.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs new file mode 100644 index 000000000000..f96ba9da94b9 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp +{ + 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/SelfHelp/SelfHelp.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs new file mode 100644 index 000000000000..29f9ee02dc10 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp +{ + 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/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs index c1ead134e698..b6c969c4a59a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs index 00cb7f82a671..e48704f0f8e5 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; protected override void ProcessRecord() { diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index bd1b351a12df..5bc0dec94bce 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/generated/SelfHelp/SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index ba66d0a936c2..c1deb1123262 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/generated/SelfHelp/SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs index cea622fa031c..dfc07c52d4a1 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -12,50 +12,96 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index 4514a86aae32..9cac5874020f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/generated/SelfHelp/SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs index 9d4a8979684b..f87f95f645ba 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs +++ b/generated/SelfHelp/SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 0b674730390c..0af07743d645 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/SelfHelp/SelfHelp.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,21 @@ public string GetProcessCustomAttributesAtRuntime() {Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; } + private string GetLoginVerification() + { + if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + { + return $@" +{Indent}{Indent}$context = Get-AzContext +{Indent}{Indent}if (-not $context -and -not $testPlayback) {{ +{Indent}{Indent}{Indent}Write-Error ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" +{Indent}{Indent}{Indent}exit +{Indent}{Indent}}} +"; + } + return ""; + } + private string GetTelemetry() { if (!VariantGroup.IsInternal && IsAzure) @@ -232,10 +263,16 @@ public override string ToString() => $@"begin {{ {Indent}{Indent}{Indent}$PSBoundParameters['OutBuffer'] = 1 {Indent}{Indent}}} {Indent}{Indent}$parameterSet = $PSCmdlet.ParameterSetName -{GetTelemetry()} +{Indent}{Indent} +{Indent}{Indent}$testPlayback = $false +{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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 +306,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.SelfHelp.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 +325,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 +423,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 +437,7 @@ public override string ToString() {CommentInfo.Description.ToDescriptionFormat(false)} {examples}{inputsText}{outputsText}{notesText} .Link -{CommentInfo.OnlineVersion}{relatedLinksText} +{CommentInfo.OnlineVersion}{relatedLinksText}{externalUrlsText} #> "; } @@ -587,7 +631,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/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs index 127d5ade8846..7da856f9513a 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -31,7 +31,7 @@ internal class VariantGroup { public string ModuleName { get; } - public string RootModuleName {get => @"";} + public string RootModuleName { get => @""; } 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/"; @@ -391,6 +409,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 +441,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 +464,7 @@ public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterG Name = infoAttribute.Name; Description = infoAttribute.Description; Script = infoAttribute.Script; + SetCondition = infoAttribute.SetCondition; ParameterGroup = parameterGroup; } @@ -479,7 +512,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 +541,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/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/PsAttributes.cs index babdad4868ac..de078e47e4aa 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/generated/SelfHelp/SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/PsExtensions.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/PsExtensions.cs index 8f8612804f4f..7f0d7751362c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/PsExtensions.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/PsExtensions.cs @@ -13,6 +13,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PowerShell { 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/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/PsHelpers.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/PsHelpers.cs index 09cde60539c3..2c76f8fe724c 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/BuildTime/PsHelpers.cs +++ b/generated/SelfHelp/SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/runtime/Context.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/Context.cs new file mode 100644 index 000000000000..abfc7feb5ad8 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.Extensions; + + /// + /// The IContext Interface defines the communication mechanism for input customization. + /// + /// + /// In the context, we will have client, pipeline, PSBoundParamters, 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.SelfHelp.SelfHelp Client { get; } + } +} diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/Events.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/Events.cs index 226127832e90..1e7b3acb11d5 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/Events.cs +++ b/generated/SelfHelp/SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/runtime/ISendAsync.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/ISendAsync.cs index 5985bf169406..2ea6ebb1c418 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/ISendAsync.cs +++ b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/ISendAsync.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/runtime/InfoAttribute.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/InfoAttribute.cs index ccb78e9df89b..f1415929a598 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/InfoAttribute.cs +++ b/generated/SelfHelp/SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/runtime/InputHandler.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/InputHandler.cs new file mode 100644 index 000000000000..cae168ab0d55 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.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.SelfHelp.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.SelfHelp.Runtime.IContext context); + } +} \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs index d91c37e54d1c..fa675cb87cd8 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs +++ b/generated/SelfHelp/SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/runtime/SerializationMode.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/SerializationMode.cs index 760f19a79083..8dc15112d88f 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/SerializationMode.cs +++ b/generated/SelfHelp/SelfHelp.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/SelfHelp/SelfHelp.Autorest/generated/runtime/TypeConverterExtensions.cs b/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/TypeConverterExtensions.cs index fa70d8f2bed8..aafba9ac3bb2 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/generated/runtime/TypeConverterExtensions.cs +++ b/generated/SelfHelp/SelfHelp.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/SelfHelp/SelfHelp.Autorest/internal/Get-AzSelfHelpOperation.ps1 b/generated/SelfHelp/SelfHelp.Autorest/internal/Get-AzSelfHelpOperation.ps1 index fc5ef7861da9..93ca19be1f4b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/internal/Get-AzSelfHelpOperation.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/internal/Get-AzSelfHelpOperation.ps1 @@ -25,12 +25,12 @@ Returns list of operations. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperation .Link https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpoperation #> function Get-AzSelfHelpOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -89,12 +89,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ List = 'Az.SelfHelp.private\Get-AzSelfHelpOperation_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/SelfHelp/SelfHelp.Autorest/internal/ProxyCmdletDefinitions.ps1 b/generated/SelfHelp/SelfHelp.Autorest/internal/ProxyCmdletDefinitions.ps1 index fc5ef7861da9..93ca19be1f4b 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/SelfHelp/SelfHelp.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -25,12 +25,12 @@ Returns list of operations. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation +Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperation .Link https://learn.microsoft.com/powershell/module/az.selfhelp/get-azselfhelpoperation #> function Get-AzSelfHelpOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.IOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -89,12 +89,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ List = 'Az.SelfHelp.private\Get-AzSelfHelpOperation_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) diff --git a/generated/SelfHelp/SelfHelp.Autorest/resources/README.md b/generated/SelfHelp/SelfHelp.Autorest/resources/README.md new file mode 100644 index 000000000000..937f07f8fec2 --- /dev/null +++ b/generated/SelfHelp/SelfHelp.Autorest/resources/README.md @@ -0,0 +1,11 @@ +# Resources +This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder. + +## Info +- Modifiable: yes +- Generated: no +- Committed: yes +- Packaged: no + +## Purpose +Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact. \ No newline at end of file diff --git a/generated/SelfHelp/SelfHelp.Autorest/test-module.ps1 b/generated/SelfHelp/SelfHelp.Autorest/test-module.ps1 index c42703f42ddd..00777a289c0d 100644 --- a/generated/SelfHelp/SelfHelp.Autorest/test-module.ps1 +++ b/generated/SelfHelp/SelfHelp.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/src/Accounts/Accounts/ChangeLog.md b/src/Accounts/Accounts/ChangeLog.md index 2d42942e0c2b..e0b327d1e563 100644 --- a/src/Accounts/Accounts/ChangeLog.md +++ b/src/Accounts/Accounts/ChangeLog.md @@ -20,6 +20,7 @@ ## Upcoming Release * Upgrade Azure.Core to 1.45.0 +* Added definition of Bleu cloud so it can be used with commands like `Enter-AzVM` ## Version 5.0.1 * Force `Get-AzAccessToken` to always return SecureString as long as `AsSecureString` is set diff --git a/src/Accounts/Authentication/Factories/SshCredentialFactory.cs b/src/Accounts/Authentication/Factories/SshCredentialFactory.cs index 2922a88e332a..678eeaeceb08 100644 --- a/src/Accounts/Authentication/Factories/SshCredentialFactory.cs +++ b/src/Accounts/Authentication/Factories/SshCredentialFactory.cs @@ -35,6 +35,7 @@ public class SshCredentialFactory : ISshCredentialFactory { "azurecloud", "https://pas.windows.net/CheckMyAccess/Linux/.default" }, { "azurechinacloud", "https://pas.chinacloudapi.cn/CheckMyAccess/Linux/.default" }, { "azureusgovernment", "https://pasff.usgovcloudapi.net/CheckMyAccess/Linux/.default" }, + { "bleu", "https://pas.identity.sovcloud-api.fr/CheckMyAccess/Linux/.default" }, }; private string CreateJwk(RSAParameters rsaKeyInfo, out string keyId) diff --git a/src/Batch/Batch/help/Get-AzBatchPoolNodeCount.md b/src/Batch/Batch/help/Get-AzBatchPoolNodeCount.md index 8ffaaa601b0e..a3ecea09ea19 100644 --- a/src/Batch/Batch/help/Get-AzBatchPoolNodeCount.md +++ b/src/Batch/Batch/help/Get-AzBatchPoolNodeCount.md @@ -194,8 +194,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Get-AzBatchAccountKey]() +[Get-AzBatchAccountKey](Get-AzBatchAccountKey.md) -[Get-AzBatchJob]() +[Get-AzBatchJob](Get-AzBatchJob.md) -[Azure Batch Cmdlets]() +[Azure Batch Cmdlets](Az.Batch.md) diff --git a/src/Compute/Compute/ChangeLog.md b/src/Compute/Compute/ChangeLog.md index 4f72866e676f..320ee4b48320 100644 --- a/src/Compute/Compute/ChangeLog.md +++ b/src/Compute/Compute/ChangeLog.md @@ -20,6 +20,7 @@ --> ## Upcoming Release +* Added breaking change message for `New-AzVM` and `New-AzVmss` cmdlets. ## Version 10.0.0 * Added new properties `Architecture`, `HyperVGeneration`, and `ImageDeprecationStatus` to be returned in `Get-AzVMImage` ListVMImage parameter set. diff --git a/src/Compute/Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetCreateOrUpdateMethod.cs b/src/Compute/Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetCreateOrUpdateMethod.cs index 8ec6334a5b03..e7fb3944b98b 100644 --- a/src/Compute/Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetCreateOrUpdateMethod.cs +++ b/src/Compute/Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetCreateOrUpdateMethod.cs @@ -40,6 +40,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation { + [GenericBreakingChangeWithVersion("In the next breaking change period (Nov 2025), the default VM size will change from 'Standard_Ds1_v2' to 'Standard_D2s_v5'.", "15.0.0", "11.0.0")] [Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Vmss", DefaultParameterSetName = "DefaultParameter", SupportsShouldProcess = true)] [OutputType(typeof(PSVirtualMachineScaleSet))] public partial class NewAzureRmVmss : ComputeAutomationBaseCmdlet diff --git a/src/Compute/Compute/VirtualMachine/Operation/NewAzureVMCommand.cs b/src/Compute/Compute/VirtualMachine/Operation/NewAzureVMCommand.cs index 605751e477b8..05549c9c050b 100644 --- a/src/Compute/Compute/VirtualMachine/Operation/NewAzureVMCommand.cs +++ b/src/Compute/Compute/VirtualMachine/Operation/NewAzureVMCommand.cs @@ -59,6 +59,7 @@ namespace Microsoft.Azure.Commands.Compute { + [GenericBreakingChangeWithVersion("The default VM size will change from 'Standard_D2s_v3' to 'Standard_D2s_v5'.", "15.0.0", "11.0.0", "Nov 2025")] [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VM", SupportsShouldProcess = true, DefaultParameterSetName = "SimpleParameterSet")] [OutputType(typeof(PSAzureOperationResponse), typeof(PSVirtualMachine))] public class NewAzureVMCommand : VirtualMachineBaseCmdlet diff --git a/src/Compute/Compute/help/Add-AzVMSecret.md b/src/Compute/Compute/help/Add-AzVMSecret.md index 42fd946d4971..44d166a91b08 100644 --- a/src/Compute/Compute/help/Add-AzVMSecret.md +++ b/src/Compute/Compute/help/Add-AzVMSecret.md @@ -24,7 +24,7 @@ Add-AzVMSecret [-VM] [[-SourceVaultId] ] [[-Certifica The **Add-AzVMSecret** cmdlet adds a secret to a virtual machine. This value lets you add a certificate to the virtual machine. The secret must be stored in a Key Vault. -For more information about Key Vault, see [What is Azure Key Vault?](https://azure.microsoft.com/documentation/articles/key-vault-whatis/). +For more information about Key Vault, see [What is Azure Key Vault?](/azure/key-vault/general/overview). For more information about the cmdlets, see [Azure Key Vault Cmdlets](/powershell/module/az.keyvault) or the [Set-AzKeyVaultSecret](/powershell/module/az.keyvault/set-azkeyvaultsecret) cmdlet. > [!NOTE] diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionRoleConfigurationObject.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionRoleConfigurationObject.md index 096b6d9aa78d..8b316955f73d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionRoleConfigurationObject.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionRoleConfigurationObject.md @@ -221,10 +221,7 @@ Specifies the name of the administrator account. **Max-length (Linux):** 64 characters - **Max-length (Windows):** 20 characters - -\ For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -\ For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + **Max-length (Windows):** 20 characters ```yaml Type: System.String @@ -250,9 +247,7 @@ The maximum length of the binary array is 65535 bytes. customData is passed to the VM to be saved as a file. -For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - - For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). +For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) ```yaml Type: System.String diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionVendorConfigurationObject.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionVendorConfigurationObject.md index fad6c99d6980..d781be72466d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionVendorConfigurationObject.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionVendorConfigurationObject.md @@ -70,10 +70,7 @@ Specifies the name of the administrator account. **Max-length (Linux):** 64 characters - **Max-length (Windows):** 20 characters - -\ For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -\ For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + **Max-length (Windows):** 20 characters ```yaml Type: System.String @@ -99,9 +96,7 @@ The maximum length of the binary array is 65535 bytes. customData is passed to the VM to be saved as a file. -For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - - For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). +For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) ```yaml Type: System.String diff --git a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2.md b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2.md index f92895cca868..be83f6edc33f 100644 --- a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2.md +++ b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2.md @@ -138,7 +138,7 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories ## RELATED LINKS -[Set-AzDataFactoryV2]() +[Set-AzDataFactoryV2](Set-AzDataFactoryV2.md) -[Remove-AzDataFactoryV2]() +[Remove-AzDataFactoryV2](Remove-AzDataFactoryV2.md) diff --git a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2ActivityRun.md b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2ActivityRun.md index bf750fd8e37a..5c37df53ffe6 100644 --- a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2ActivityRun.md +++ b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2ActivityRun.md @@ -207,7 +207,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Invoke-AzDataFactoryV2Pipeline]() +[Invoke-AzDataFactoryV2Pipeline](Invoke-AzDataFactoryV2Pipeline.md) -[Get-AzDataFactoryV2PipelineRun]() +[Get-AzDataFactoryV2PipelineRun](Get-AzDataFactoryV2PipelineRun.md) diff --git a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2Dataset.md b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2Dataset.md index bcb5ffa32460..67b03c9b78ca 100644 --- a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2Dataset.md +++ b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2Dataset.md @@ -192,6 +192,6 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories ## RELATED LINKS -[Set-AzDataFactoryV2Dataset]() +[Set-AzDataFactoryV2Dataset](Set-AzDataFactoryV2Dataset.md) -[Remove-AzDataFactoryV2Dataset]() +[Remove-AzDataFactoryV2Dataset](Remove-AzDataFactoryV2Dataset.md) diff --git a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntime.md b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntime.md index 3f51e324b1f0..3aa696005149 100644 --- a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntime.md +++ b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntime.md @@ -287,6 +287,6 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories, c ## RELATED LINKS -[Set-AzDataFactoryV2IntegrationRuntime]() +[Set-AzDataFactoryV2IntegrationRuntime](Set-AzDataFactoryV2IntegrationRuntime.md) -[Remove-AzDataFactoryV2IntegrationRuntime]() +[Remove-AzDataFactoryV2IntegrationRuntime](Remove-AzDataFactoryV2IntegrationRuntime.md) diff --git a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeKey.md b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeKey.md index 31f2b8adb16d..432be8e9a816 100644 --- a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeKey.md +++ b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeKey.md @@ -157,4 +157,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[New-AzDataFactoryV2IntegrationRuntimeKey]() +[New-AzDataFactoryV2IntegrationRuntimeKey](New-AzDataFactoryV2IntegrationRuntimeKey.md) diff --git a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeMetric.md b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeMetric.md index 8b4bc8f7533e..a88be594b59b 100644 --- a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeMetric.md +++ b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeMetric.md @@ -157,5 +157,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Get-AzDataFactoryV2IntegrationRuntime]() +[Get-AzDataFactoryV2IntegrationRuntime](Get-AzDataFactoryV2IntegrationRuntime.md) diff --git a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeNode.md b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeNode.md index ecd61d92c29a..895cf3350f62 100644 --- a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeNode.md +++ b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeNode.md @@ -242,4 +242,4 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories, c ## RELATED LINKS -[Get-AzDataFactoryV2IntegrationRuntime]() +[Get-AzDataFactoryV2IntegrationRuntime](Get-AzDataFactoryV2IntegrationRuntime.md) diff --git a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeOutboundNetworkDependenciesEndpoint.md b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeOutboundNetworkDependenciesEndpoint.md index d3a9a91873a8..965109f94a03 100644 --- a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeOutboundNetworkDependenciesEndpoint.md +++ b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2IntegrationRuntimeOutboundNetworkDependenciesEndpoint.md @@ -159,4 +159,4 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories, c ## RELATED LINKS -[Get-AzDataFactoryV2IntegrationRuntime]() +[Get-AzDataFactoryV2IntegrationRuntime](Get-AzDataFactoryV2IntegrationRuntime.md) diff --git a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2LinkedService.md b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2LinkedService.md index 275d87c3ca7a..a37de9fe9beb 100644 --- a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2LinkedService.md +++ b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2LinkedService.md @@ -207,6 +207,6 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories ## RELATED LINKS -[Set-AzDataFactoryV2LinkedService]() +[Set-AzDataFactoryV2LinkedService](Set-AzDataFactoryV2LinkedService.md) -[Remove-AzDataFactoryV2LinkedService]() +[Remove-AzDataFactoryV2LinkedService](Remove-AzDataFactoryV2LinkedService.md) diff --git a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2Pipeline.md b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2Pipeline.md index b267b7e0608d..106c67147bd8 100644 --- a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2Pipeline.md +++ b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2Pipeline.md @@ -247,8 +247,8 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories ## RELATED LINKS -[Set-AzDataFactoryV2Pipeline]() +[Set-AzDataFactoryV2Pipeline](Set-AzDataFactoryV2Pipeline.md) -[Remove-AzDataFactoryV2Pipeline]() +[Remove-AzDataFactoryV2Pipeline](Remove-AzDataFactoryV2Pipeline.md) -[Invoke-AzDataFactoryV2Pipeline]() +[Invoke-AzDataFactoryV2Pipeline](Invoke-AzDataFactoryV2Pipeline.md) diff --git a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2PipelineRun.md b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2PipelineRun.md index 85dba5f9b8c4..a85153ef26bc 100644 --- a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2PipelineRun.md +++ b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2PipelineRun.md @@ -203,7 +203,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Invoke-AzDataFactoryV2Pipeline]() +[Invoke-AzDataFactoryV2Pipeline](Invoke-AzDataFactoryV2Pipeline.md) -[Get-AzDataFactoryV2ActivityRun]() +[Get-AzDataFactoryV2ActivityRun](Get-AzDataFactoryV2ActivityRun.md) diff --git a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2Trigger.md b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2Trigger.md index a0ac19621e71..a3b4eeb769cb 100644 --- a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2Trigger.md +++ b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2Trigger.md @@ -180,10 +180,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Set-AzDataFactoryV2Trigger]() +[Set-AzDataFactoryV2Trigger](Set-AzDataFactoryV2Trigger.md) -[Start-AzDataFactoryV2Trigger]() +[Start-AzDataFactoryV2Trigger](Start-AzDataFactoryV2Trigger.md) -[Stop-AzDataFactoryV2Trigger]() +[Stop-AzDataFactoryV2Trigger](Stop-AzDataFactoryV2Trigger.md) -[Remove-AzDataFactoryV2Trigger]() +[Remove-AzDataFactoryV2Trigger](Remove-AzDataFactoryV2Trigger.md) diff --git a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2TriggerRun.md b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2TriggerRun.md index c81a1c2608b7..c7a321760728 100644 --- a/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2TriggerRun.md +++ b/src/DataFactory/DataFactory/help/Get-AzDataFactoryV2TriggerRun.md @@ -172,7 +172,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Start-AzDataFactoryV2Trigger]() +[Start-AzDataFactoryV2Trigger](Start-AzDataFactoryV2Trigger.md) -[Stop-AzDataFactoryV2Trigger]() +[Stop-AzDataFactoryV2Trigger](Stop-AzDataFactoryV2Trigger.md) diff --git a/src/DataFactory/DataFactory/help/Invoke-AzDataFactoryV2IntegrationRuntimeUpgrade.md b/src/DataFactory/DataFactory/help/Invoke-AzDataFactoryV2IntegrationRuntimeUpgrade.md index 4b3290ec4bc3..7b0cedc37510 100644 --- a/src/DataFactory/DataFactory/help/Invoke-AzDataFactoryV2IntegrationRuntimeUpgrade.md +++ b/src/DataFactory/DataFactory/help/Invoke-AzDataFactoryV2IntegrationRuntimeUpgrade.md @@ -184,6 +184,6 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories, c ## RELATED LINKS -[Set-AzDataFactoryV2IntegrationRuntime]() -[Get-AzDataFactoryV2IntegrationRuntime]() +[Set-AzDataFactoryV2IntegrationRuntime](Set-AzDataFactoryV2IntegrationRuntime.md) +[Get-AzDataFactoryV2IntegrationRuntime](Get-AzDataFactoryV2IntegrationRuntime.md) diff --git a/src/DataFactory/DataFactory/help/Invoke-AzDataFactoryV2Pipeline.md b/src/DataFactory/DataFactory/help/Invoke-AzDataFactoryV2Pipeline.md index c7db69ced6f2..2c8116b6c1a1 100644 --- a/src/DataFactory/DataFactory/help/Invoke-AzDataFactoryV2Pipeline.md +++ b/src/DataFactory/DataFactory/help/Invoke-AzDataFactoryV2Pipeline.md @@ -285,7 +285,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Get-AzDataFactoryV2PipelineRun]() +[Get-AzDataFactoryV2PipelineRun](Get-AzDataFactoryV2PipelineRun.md) -[Get-AzDataFactoryV2ActivityRun]() +[Get-AzDataFactoryV2ActivityRun](Get-AzDataFactoryV2ActivityRun.md) diff --git a/src/DataFactory/DataFactory/help/New-AzDataFactoryV2IntegrationRuntimeKey.md b/src/DataFactory/DataFactory/help/New-AzDataFactoryV2IntegrationRuntimeKey.md index cfe3fcda2eba..31dacfc82936 100644 --- a/src/DataFactory/DataFactory/help/New-AzDataFactoryV2IntegrationRuntimeKey.md +++ b/src/DataFactory/DataFactory/help/New-AzDataFactoryV2IntegrationRuntimeKey.md @@ -219,4 +219,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Get-AzDataFactoryV2IntegrationRuntimeKey]() +[Get-AzDataFactoryV2IntegrationRuntimeKey](Get-AzDataFactoryV2IntegrationRuntimeKey.md) diff --git a/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2.md b/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2.md index f4e0035ec69e..38d47066daa3 100644 --- a/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2.md +++ b/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2.md @@ -191,6 +191,6 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories ## RELATED LINKS -[Get-AzDataFactoryV2]() +[Get-AzDataFactoryV2](Get-AzDataFactoryV2.md) -[Set-AzDataFactoryV2]() +[Set-AzDataFactoryV2](Set-AzDataFactoryV2.md) diff --git a/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2Dataset.md b/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2Dataset.md index 775f9be75cc9..07124cab3870 100644 --- a/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2Dataset.md +++ b/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2Dataset.md @@ -208,6 +208,6 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories ## RELATED LINKS -[Get-AzDataFactoryV2Dataset]() +[Get-AzDataFactoryV2Dataset](Get-AzDataFactoryV2Dataset.md) -[Set-AzDataFactoryV2Dataset]() +[Set-AzDataFactoryV2Dataset](Set-AzDataFactoryV2Dataset.md) diff --git a/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2IntegrationRuntime.md b/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2IntegrationRuntime.md index 0107bfec064e..f609c5ce183d 100644 --- a/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2IntegrationRuntime.md +++ b/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2IntegrationRuntime.md @@ -215,7 +215,7 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories, c ## RELATED LINKS -[Set-AzDataFactoryV2IntegrationRuntime]() +[Set-AzDataFactoryV2IntegrationRuntime](Set-AzDataFactoryV2IntegrationRuntime.md) -[Get-AzDataFactoryV2IntegrationRuntime]() +[Get-AzDataFactoryV2IntegrationRuntime](Get-AzDataFactoryV2IntegrationRuntime.md) diff --git a/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2LinkedService.md b/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2LinkedService.md index ea5497aa2fe7..ba1970a15736 100644 --- a/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2LinkedService.md +++ b/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2LinkedService.md @@ -209,7 +209,7 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories ## RELATED LINKS -[Get-AzDataFactoryV2LinkedService]() +[Get-AzDataFactoryV2LinkedService](Get-AzDataFactoryV2LinkedService.md) -[Set-AzDataFactoryV2LinkedService]() +[Set-AzDataFactoryV2LinkedService](Set-AzDataFactoryV2LinkedService.md) diff --git a/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2Pipeline.md b/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2Pipeline.md index d1b03d99303c..133c0c71bdb0 100644 --- a/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2Pipeline.md +++ b/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2Pipeline.md @@ -209,9 +209,9 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories ## RELATED LINKS -[Get-AzDataFactoryV2Pipeline]() +[Get-AzDataFactoryV2Pipeline](Get-AzDataFactoryV2Pipeline.md) -[Set-AzDataFactoryV2Pipeline]() +[Set-AzDataFactoryV2Pipeline](Set-AzDataFactoryV2Pipeline.md) -[Invoke-AzDataFactoryV2Pipeline]() +[Invoke-AzDataFactoryV2Pipeline](Invoke-AzDataFactoryV2Pipeline.md) diff --git a/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2Trigger.md b/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2Trigger.md index 4c5591e2fd0c..25d3c68cb42c 100644 --- a/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2Trigger.md +++ b/src/DataFactory/DataFactory/help/Remove-AzDataFactoryV2Trigger.md @@ -204,11 +204,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Get-AzDataFactoryV2Trigger]() +[Get-AzDataFactoryV2Trigger](Get-AzDataFactoryV2Trigger.md) -[Set-AzDataFactoryV2Trigger]() +[Set-AzDataFactoryV2Trigger](Set-AzDataFactoryV2Trigger.md) -[Start-AzDataFactoryV2Trigger]() +[Start-AzDataFactoryV2Trigger](Start-AzDataFactoryV2Trigger.md) -[Stop-AzDataFactoryV2Trigger]() +[Stop-AzDataFactoryV2Trigger](Stop-AzDataFactoryV2Trigger.md) diff --git a/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2.md b/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2.md index fd5cefc9c06e..87f1092e6a15 100644 --- a/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2.md +++ b/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2.md @@ -681,6 +681,6 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories ## RELATED LINKS -[Get-AzDataFactoryV2]() +[Get-AzDataFactoryV2](Get-AzDataFactoryV2.md) -[Remove-AzDataFactoryV2]() +[Remove-AzDataFactoryV2](Remove-AzDataFactoryV2.md) diff --git a/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2Dataset.md b/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2Dataset.md index 9c791e40c81d..0d1e0d1eea2b 100644 --- a/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2Dataset.md +++ b/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2Dataset.md @@ -210,6 +210,6 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories ## RELATED LINKS -[Get-AzDataFactoryV2Dataset]() +[Get-AzDataFactoryV2Dataset](Get-AzDataFactoryV2Dataset.md) -[Remove-AzDataFactoryV2Dataset]() +[Remove-AzDataFactoryV2Dataset](Remove-AzDataFactoryV2Dataset.md) diff --git a/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2IntegrationRuntime.md b/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2IntegrationRuntime.md index 93adc21de214..0a0e7b096882 100644 --- a/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2IntegrationRuntime.md +++ b/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2IntegrationRuntime.md @@ -816,4 +816,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Set-AzDataFactoryV2IntegrationRuntime]() +[Set-AzDataFactoryV2IntegrationRuntime](Set-AzDataFactoryV2IntegrationRuntime.md) diff --git a/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2LinkedService.md b/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2LinkedService.md index b944433fdd0e..0bc28a9d1d89 100644 --- a/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2LinkedService.md +++ b/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2LinkedService.md @@ -210,6 +210,6 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories ## RELATED LINKS -[Get-AzDataFactoryV2LinkedService]() +[Get-AzDataFactoryV2LinkedService](Get-AzDataFactoryV2LinkedService.md) -[Remove-AzDataFactoryV2LinkedService]() +[Remove-AzDataFactoryV2LinkedService](Remove-AzDataFactoryV2LinkedService.md) diff --git a/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2Pipeline.md b/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2Pipeline.md index 56bdb8dbb16f..a0f69ae6c58a 100644 --- a/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2Pipeline.md +++ b/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2Pipeline.md @@ -211,8 +211,8 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories ## RELATED LINKS -[Get-AzDataFactoryV2Pipeline]() +[Get-AzDataFactoryV2Pipeline](Get-AzDataFactoryV2Pipeline.md) -[Remove-AzDataFactoryV2Pipeline]() +[Remove-AzDataFactoryV2Pipeline](Remove-AzDataFactoryV2Pipeline.md) -[Invoke-AzDataFactoryV2Pipeline]() +[Invoke-AzDataFactoryV2Pipeline](Invoke-AzDataFactoryV2Pipeline.md) diff --git a/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2Trigger.md b/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2Trigger.md index 3caffdf7ddd1..edc9a519f5fb 100644 --- a/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2Trigger.md +++ b/src/DataFactory/DataFactory/help/Set-AzDataFactoryV2Trigger.md @@ -197,10 +197,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Get-AzDataFactoryV2Trigger]() +[Get-AzDataFactoryV2Trigger](Get-AzDataFactoryV2Trigger.md) -[Start-AzDataFactoryV2Trigger]() +[Start-AzDataFactoryV2Trigger](Start-AzDataFactoryV2Trigger.md) -[Stop-AzDataFactoryV2Trigger]() +[Stop-AzDataFactoryV2Trigger](Stop-AzDataFactoryV2Trigger.md) -[Remove-AzDataFactoryV2Trigger]() +[Remove-AzDataFactoryV2Trigger](Remove-AzDataFactoryV2Trigger.md) diff --git a/src/DataFactory/DataFactory/help/Start-AzDataFactoryV2IntegrationRuntime.md b/src/DataFactory/DataFactory/help/Start-AzDataFactoryV2IntegrationRuntime.md index 7480dcfa7e85..07c8a248bd7b 100644 --- a/src/DataFactory/DataFactory/help/Start-AzDataFactoryV2IntegrationRuntime.md +++ b/src/DataFactory/DataFactory/help/Start-AzDataFactoryV2IntegrationRuntime.md @@ -222,4 +222,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Stop-AzDataFactoryV2IntegrationRuntime]() +[Stop-AzDataFactoryV2IntegrationRuntime](Stop-AzDataFactoryV2IntegrationRuntime.md) diff --git a/src/DataFactory/DataFactory/help/Start-AzDataFactoryV2Trigger.md b/src/DataFactory/DataFactory/help/Start-AzDataFactoryV2Trigger.md index 94e462ee62eb..f64237fa102b 100644 --- a/src/DataFactory/DataFactory/help/Start-AzDataFactoryV2Trigger.md +++ b/src/DataFactory/DataFactory/help/Start-AzDataFactoryV2Trigger.md @@ -204,10 +204,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Get-AzDataFactoryV2Trigger]() +[Get-AzDataFactoryV2Trigger](Get-AzDataFactoryV2Trigger.md) -[Set-AzDataFactoryV2Trigger]() +[Set-AzDataFactoryV2Trigger](Set-AzDataFactoryV2Trigger.md) -[Stop-AzDataFactoryV2Trigger]() +[Stop-AzDataFactoryV2Trigger](Stop-AzDataFactoryV2Trigger.md) -[Remove-AzDataFactoryV2Trigger]() +[Remove-AzDataFactoryV2Trigger](Remove-AzDataFactoryV2Trigger.md) diff --git a/src/DataFactory/DataFactory/help/Stop-AzDataFactoryV2IntegrationRuntime.md b/src/DataFactory/DataFactory/help/Stop-AzDataFactoryV2IntegrationRuntime.md index dbac63fd1405..2f5a50ea11f0 100644 --- a/src/DataFactory/DataFactory/help/Stop-AzDataFactoryV2IntegrationRuntime.md +++ b/src/DataFactory/DataFactory/help/Stop-AzDataFactoryV2IntegrationRuntime.md @@ -198,4 +198,4 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories, c ## RELATED LINKS -[Start-AzDataFactoryV2IntegrationRuntime]() +[Start-AzDataFactoryV2IntegrationRuntime](Start-AzDataFactoryV2IntegrationRuntime.md) diff --git a/src/DataFactory/DataFactory/help/Stop-AzDataFactoryV2Trigger.md b/src/DataFactory/DataFactory/help/Stop-AzDataFactoryV2Trigger.md index b6d9aedb5d45..dc13a87aa0bd 100644 --- a/src/DataFactory/DataFactory/help/Stop-AzDataFactoryV2Trigger.md +++ b/src/DataFactory/DataFactory/help/Stop-AzDataFactoryV2Trigger.md @@ -203,10 +203,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Get-AzDataFactoryV2Trigger]() +[Get-AzDataFactoryV2Trigger](Get-AzDataFactoryV2Trigger.md) -[Set-AzDataFactoryV2Trigger]() +[Set-AzDataFactoryV2Trigger](Set-AzDataFactoryV2Trigger.md) -[Start-AzDataFactoryV2Trigger]() +[Start-AzDataFactoryV2Trigger](Start-AzDataFactoryV2Trigger.md) -[Remove-AzDataFactoryV2Trigger]() +[Remove-AzDataFactoryV2Trigger](Remove-AzDataFactoryV2Trigger.md) diff --git a/src/DataFactory/DataFactory/help/Update-AzDataFactoryV2IntegrationRuntime.md b/src/DataFactory/DataFactory/help/Update-AzDataFactoryV2IntegrationRuntime.md index 81de8e0593c7..f3568b4ecdbd 100644 --- a/src/DataFactory/DataFactory/help/Update-AzDataFactoryV2IntegrationRuntime.md +++ b/src/DataFactory/DataFactory/help/Update-AzDataFactoryV2IntegrationRuntime.md @@ -242,6 +242,6 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories, c ## RELATED LINKS -[Set-AzDataFactoryV2IntegrationRuntime]() -[Get-AzDataFactoryV2IntegrationRuntime]() +[Set-AzDataFactoryV2IntegrationRuntime](Set-AzDataFactoryV2IntegrationRuntime.md) +[Get-AzDataFactoryV2IntegrationRuntime](Get-AzDataFactoryV2IntegrationRuntime.md) diff --git a/src/DataFactory/DataFactory/help/Update-AzDataFactoryV2IntegrationRuntimeNode.md b/src/DataFactory/DataFactory/help/Update-AzDataFactoryV2IntegrationRuntimeNode.md index 2ab5dd4227eb..2ebaef934d43 100644 --- a/src/DataFactory/DataFactory/help/Update-AzDataFactoryV2IntegrationRuntimeNode.md +++ b/src/DataFactory/DataFactory/help/Update-AzDataFactoryV2IntegrationRuntimeNode.md @@ -221,6 +221,6 @@ Keywords: azure, azurerm, arm, resource, management, manager, data, factories, c ## RELATED LINKS -[Set-AzDataFactoryV2IntegrationRuntime]() -[Get-AzDataFactoryV2IntegrationRuntime]() +[Set-AzDataFactoryV2IntegrationRuntime](Set-AzDataFactoryV2IntegrationRuntime.md) +[Get-AzDataFactoryV2IntegrationRuntime](Get-AzDataFactoryV2IntegrationRuntime.md) diff --git a/src/KeyVault/KeyVault/help/Add-AzKeyVaultKey.md b/src/KeyVault/KeyVault/help/Add-AzKeyVaultKey.md index 7b2eadda76c3..2d1bd67aa3c0 100644 --- a/src/KeyVault/KeyVault/help/Add-AzKeyVaultKey.md +++ b/src/KeyVault/KeyVault/help/Add-AzKeyVaultKey.md @@ -135,7 +135,7 @@ in the Key Vault REST API documentation. Note: To import a key from your own hardware security module, you must first generate a BYOK package (a file with a .byok file name extension) by using the Azure Key Vault BYOK toolset. For more information, see -[How to Generate and Transfer HSM-Protected Keys for Azure Key Vault](http://go.microsoft.com/fwlink/?LinkId=522252). +[How to Generate and Transfer HSM-Protected Keys for Azure Key Vault](/azure/key-vault/keys/hsm-protected-keys). As a best practice, back up your key after it is created or updated, by using the Backup-AzKeyVaultKey cmdlet. There is no undelete functionality, so if you accidentally delete your key or delete it and then change your mind, the key is not recoverable unless you have a @@ -274,7 +274,7 @@ This command imports the key named ITByok from the location that the *KeyFilePat specifies. The imported key is an HSM-protected key. To import a key from your own hardware security module, you must first generate a BYOK package (a file with a .byok file name extension) by using the Azure Key Vault BYOK toolset. For more information, see -[How to Generate and Transfer HSM-Protected Keys for Azure Key Vault](http://go.microsoft.com/fwlink/?LinkId=522252). +[How to Generate and Transfer HSM-Protected Keys for Azure Key Vault](/azure/key-vault/keys/hsm-protected-keys). ### Example 6: Import a software-protected key ```powershell diff --git a/src/Monitor/Monitor/help/Get-AzMetricsBatch.md b/src/Monitor/Monitor/help/Get-AzMetricsBatch.md index f167cd28b10f..480d4c043720 100644 --- a/src/Monitor/Monitor/help/Get-AzMetricsBatch.md +++ b/src/Monitor/Monitor/help/Get-AzMetricsBatch.md @@ -910,7 +910,7 @@ Accept wildcard characters: False ``` ### -Endpoint -The regional endpoint to use, for example https://eastus.metrics.monitor.azure.com. +The regional endpoint to use, for example `https://eastus.metrics.monitor.azure.com`. The region should match the region of the requested resources. For global resources, the region should be 'global'. @@ -1208,7 +1208,7 @@ Accept wildcard characters: False ``` ### -Endpoint -The regional endpoint to use, for example https://eastus.metrics.monitor.azure.com. +The regional endpoint to use, for example `https://eastus.metrics.monitor.azure.com`. The region should match the region of the requested resources. For global resources, the region should be 'global'. @@ -1506,7 +1506,7 @@ Accept wildcard characters: False ``` ### -Endpoint -The regional endpoint to use, for example https://eastus.metrics.monitor.azure.com. +The regional endpoint to use, for example `https://eastus.metrics.monitor.azure.com`. The region should match the region of the requested resources. For global resources, the region should be 'global'. @@ -1804,7 +1804,7 @@ Accept wildcard characters: False ``` ### -Endpoint -The regional endpoint to use, for example https://eastus.metrics.monitor.azure.com. +The regional endpoint to use, for example `https://eastus.metrics.monitor.azure.com`. The region should match the region of the requested resources. For global resources, the region should be 'global'. diff --git a/src/Network/Network/help/Add-AzApplicationGatewayProbeConfig.md b/src/Network/Network/help/Add-AzApplicationGatewayProbeConfig.md index e11710517a03..fb0fe8960e9e 100644 --- a/src/Network/Network/help/Add-AzApplicationGatewayProbeConfig.md +++ b/src/Network/Network/help/Add-AzApplicationGatewayProbeConfig.md @@ -258,7 +258,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Add a probe to an existing application gateway](https://azure.microsoft.com/en-us/documentation/articles/application-gateway-create-probe-ps/#add-a-probe-to-an-existing-application-gateway) +[Add a probe to an existing application gateway](/azure/application-gateway/application-gateway-create-probe-ps#add-a-probe-to-an-existing-application-gateway) [Get-AzApplicationGatewayProbeConfig](./Get-AzApplicationGatewayProbeConfig.md) diff --git a/src/Network/Network/help/Get-AzApplicationGatewayProbeConfig.md b/src/Network/Network/help/Get-AzApplicationGatewayProbeConfig.md index b3560308bc21..3c86437a5dec 100644 --- a/src/Network/Network/help/Get-AzApplicationGatewayProbeConfig.md +++ b/src/Network/Network/help/Get-AzApplicationGatewayProbeConfig.md @@ -91,7 +91,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Add a probe to an existing application gateway](https://azure.microsoft.com/en-us/documentation/articles/application-gateway-create-probe-ps/#add-a-probe-to-an-existing-application-gateway) +[Add a probe to an existing application gateway](/azure/application-gateway/application-gateway-create-probe-ps#add-a-probe-to-an-existing-application-gateway) [Add-AzApplicationGatewayProbeConfig](./Add-AzApplicationGatewayProbeConfig.md) diff --git a/src/Network/Network/help/New-AzApplicationGatewayProbeConfig.md b/src/Network/Network/help/New-AzApplicationGatewayProbeConfig.md index b45dd38d3e97..4bf7cda5b6d1 100644 --- a/src/Network/Network/help/New-AzApplicationGatewayProbeConfig.md +++ b/src/Network/Network/help/New-AzApplicationGatewayProbeConfig.md @@ -251,7 +251,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Create custom probe for Application Gateway using PowerShell for Azure Resource Manager](https://azure.microsoft.com/en-us/documentation/articles/application-gateway-create-probe-ps/#) +[Create custom probe for Application Gateway using PowerShell for Azure Resource Manager](/azure/application-gateway/application-gateway-create-probe-ps) [Add-AzApplicationGatewayProbeConfig](./Add-AzApplicationGatewayProbeConfig.md) diff --git a/src/Network/Network/help/New-AzP2sVpnGateway.md b/src/Network/Network/help/New-AzP2sVpnGateway.md index fa7912d11da9..0bec260c9d94 100644 --- a/src/Network/Network/help/New-AzP2sVpnGateway.md +++ b/src/Network/Network/help/New-AzP2sVpnGateway.md @@ -458,4 +458,4 @@ System.String Microsoft.Azure.Commands.Network.Models.PSVpnServerConfiguration ## RELATED LINKS -[New-AzRoutingConfiguration]() +[New-AzRoutingConfiguration](New-AzRoutingConfiguration.md) diff --git a/src/Network/Network/help/New-AzVpnGateway.md b/src/Network/Network/help/New-AzVpnGateway.md index 5add3748d9ad..e8523094e51f 100644 --- a/src/Network/Network/help/New-AzVpnGateway.md +++ b/src/Network/Network/help/New-AzVpnGateway.md @@ -332,8 +332,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Get-AzVpnGateway]() +[Get-AzVpnGateway](Get-AzVpnGateway.md) -[Remove-AzVpnGateway]() +[Remove-AzVpnGateway](Remove-AzVpnGateway.md) -[Update-AzVpnGateway]() +[Update-AzVpnGateway](Update-AzVpnGateway.md) diff --git a/src/Network/Network/help/Remove-AzApplicationGatewayProbeConfig.md b/src/Network/Network/help/Remove-AzApplicationGatewayProbeConfig.md index d03c51a819ff..7a6258df84a6 100644 --- a/src/Network/Network/help/Remove-AzApplicationGatewayProbeConfig.md +++ b/src/Network/Network/help/Remove-AzApplicationGatewayProbeConfig.md @@ -91,7 +91,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Remove a probe from an existing application gateway](https://azure.microsoft.com/en-us/documentation/articles/application-gateway-create-probe-ps/#remove-a-probe-from-an-existing-application-gateway) +[Remove a probe from an existing application gateway](/azure/application-gateway/application-gateway-create-probe-ps#remove-a-probe-from-an-existing-application-gateway) [Add-AzApplicationGatewayProbeConfig](./Add-AzApplicationGatewayProbeConfig.md) diff --git a/src/RecoveryServices/RecoveryServices/help/Undo-AzRecoveryServicesBackupItemDeletion.md b/src/RecoveryServices/RecoveryServices/help/Undo-AzRecoveryServicesBackupItemDeletion.md index cf111f9c45a5..435579acd2e5 100644 --- a/src/RecoveryServices/RecoveryServices/help/Undo-AzRecoveryServicesBackupItemDeletion.md +++ b/src/RecoveryServices/RecoveryServices/help/Undo-AzRecoveryServicesBackupItemDeletion.md @@ -158,7 +158,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Get-AzRecoveryServicesBackupContainer]() +[Get-AzRecoveryServicesBackupContainer](Get-AzRecoveryServicesBackupContainer.md) -[Get-AzRecoveryServicesBackupItem]() +[Get-AzRecoveryServicesBackupItem](Get-AzRecoveryServicesBackupItem.md) diff --git a/src/RedisCache/RedisCache/help/Set-AzRedisCache.md b/src/RedisCache/RedisCache/help/Set-AzRedisCache.md index 643149241b37..edce01caa447 100644 --- a/src/RedisCache/RedisCache/help/Set-AzRedisCache.md +++ b/src/RedisCache/RedisCache/help/Set-AzRedisCache.md @@ -415,7 +415,7 @@ Standard and Premium tiers. Configures the number of databases. This property can be configured only at cache creation. Standard and Premium tiers. -For more information, see Manage Azure Redis Cache with Azure PowerShellhttp://go.microsoft.com/fwlink/?LinkId=800051 (http://go.microsoft.com/fwlink/?LinkId=800051). +For more information, see [Manage Azure Redis Cache with Azure PowerShell](/azure/redis/how-to-manage-redis-cache-powershell). - preferred-data-archive-auth-method Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS - preferred-data-persistence-auth-method diff --git a/src/SelfHelp/SelfHelp.Autorest/Properties/AssemblyInfo.cs b/src/SelfHelp/SelfHelp.Autorest/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..2aaa55258b53 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/Properties/AssemblyInfo.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the Apache License, Version 2.0 (the ""License""); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an ""AS IS"" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +// is regenerated. + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")] +[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] +[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] +[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - SelfHelp")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("0.2.1")] +[assembly: System.Reflection.AssemblyVersionAttribute("0.2.1")] +[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] +[assembly: System.CLSCompliantAttribute(false)] diff --git a/src/SelfHelp/SelfHelp.Autorest/README.md b/src/SelfHelp/SelfHelp.Autorest/README.md index 75899e66513f..362df70cf713 100644 --- a/src/SelfHelp/SelfHelp.Autorest/README.md +++ b/src/SelfHelp/SelfHelp.Autorest/README.md @@ -46,25 +46,19 @@ module-version: 0.1.0 title: SelfHelp subject-prefix: $(service-name) -# If there are post APIs for some kinds of actions in the RP, you may need to -# uncomment following line to support viaIdentity for these post APIs -# identity-correction-for-post: true -resourcegroup-append: true -nested-object-to-string: true - -# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option -use-extension: - "@autorest/powershell": "3.x" - directive: # Following is two common directive which are normally required in all the RPs # 1. Remove the unexpanded parameter set # 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well - where: - variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ + variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString)) remove: true # Remove the set-* cmdlet - where: verb: Set remove: true + - where: + verb: Update + subject: Diagnostic|SimplifiedSolution|Troubleshooter + remove: true ``` diff --git a/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/solutions.json b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/solutions.json index 467168dd47ab..670c99f4d5ad 100644 --- a/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/solutions.json +++ b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/solutions.json @@ -37,39 +37,6 @@ ] } ] - }, - { - "name": "Invoke-AzSelfHelpWarmSolutionUp", - "description": "Warm up the solution resource by preloading asynchronous diagnostics results into cache", - "path": "/{scope}/providers/Microsoft.Help/solutions/{solutionResourceName}/warmup", - "help": { - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpwarmsolutionup" - }, - "parameterSets": [ - { - "parameters": [ - "-Scope ", - "-SolutionResourceName " - ] - } - ] - }, - "examples": [ - { - "description": "Warm up the solution resource by preloading asynchronous diagnostics results into cache", - "parameters": [ - { - "name": "-Scope", - "value": "[Path.scope]" - }, - { - "name": "-SolutionResourceName", - "value": "[Path.solutionResourceName]" - } - ] - } - ] } ] } diff --git a/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/troubleshooters.json b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/troubleshooters.json index d97c2a006635..556872a5fa14 100644 --- a/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/troubleshooters.json +++ b/src/SelfHelp/SelfHelp.Autorest/UX/Microsoft.Help/troubleshooters.json @@ -7,7 +7,7 @@ "commands": [ { "name": "Get-AzSelfHelpTroubleshooter", - "description": "Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow.\nThis API requires the Troubleshooter resource name that was created using the Create API.", + "description": "Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow.\nThis API requires the Troubleshooter resource name that was created using the get API.", "path": "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}", "help": { "learnMore": { @@ -24,7 +24,7 @@ }, "examples": [ { - "description": "Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created using the Create API.", + "description": "Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. This API requires the Troubleshooter resource name that was created using the get API.", "parameters": [ { "name": "-Name", @@ -38,39 +38,6 @@ } ] }, - { - "name": "Invoke-AzSelfHelpContinueTroubleshooter", - "description": "Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.\n
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process.\nThis API is used after the Troubleshooter has been created using the Create API.", - "path": "/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/continue", - "help": { - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.selfhelp/invoke-azselfhelpcontinuetroubleshooter" - }, - "parameterSets": [ - { - "parameters": [ - "-Scope ", - "-TroubleshooterName " - ] - } - ] - }, - "examples": [ - { - "description": "Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name.
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. This API is used after the Troubleshooter has been created using the Create API.", - "parameters": [ - { - "name": "-Scope", - "value": "[Path.scope]" - }, - { - "name": "-TroubleshooterName", - "value": "[Path.troubleshooterName]" - } - ] - } - ] - }, { "name": "Restart-AzSelfHelpTroubleshooter", "description": "Restarts the troubleshooter API using applicable troubleshooter resource name as the input.
It returns new resource name which should be used in subsequent request.\nThe old resource name is obsolete after this API is invoked.", diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Az.SelfHelp.md b/src/SelfHelp/SelfHelp.Autorest/docs/Az.SelfHelp.md index 1eb4292cad83..4fc82bef2877 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Az.SelfHelp.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Az.SelfHelp.md @@ -1,6 +1,6 @@ --- Module Name: Az.SelfHelp -Module Guid: 2705ffd2-39d8-491f-b0c6-14fca2dc3727 +Module Guid: 7d65b6ab-a31c-4bd0-a352-36f483643432 Download Help Link: https://learn.microsoft.com/powershell/module/az.selfhelp Help Version: 1.0.0.0 Locale: en-US @@ -30,7 +30,7 @@ These are static self help content to help users troubleshoot their issues. ### [Get-AzSelfHelpTroubleshooter](Get-AzSelfHelpTroubleshooter.md) Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.\
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. -This API requires the Troubleshooter resource name that was created using the Create API. +This API requires the Troubleshooter resource name that was created using the get API. ### [Invoke-AzSelfHelpCheckNameAvailability](Invoke-AzSelfHelpCheckNameAvailability.md) This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions @@ -38,7 +38,7 @@ This API is used to check the uniqueness of a resource name used for a diagnosti ### [Invoke-AzSelfHelpContinueTroubleshooter](Invoke-AzSelfHelpContinueTroubleshooter.md) Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. \
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. -This API is used after the Troubleshooter has been created using the Create API. +This API is used after the Troubleshooter has been created using the continue API. ### [Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope](Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md) Solution discovery using natural language processing. @@ -50,18 +50,18 @@ Solution discovery using natural language processing. Warm up the solution resource by preloading asynchronous diagnostics results into cache ### [New-AzSelfHelpDiagnostic](New-AzSelfHelpDiagnostic.md) -Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. \
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.\
\
\Note: \ ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. ### [New-AzSelfHelpSimplifiedSolution](New-AzSelfHelpSimplifiedSolution.md) -Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +create a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. \
\
\Note:\ \
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API. \
### [New-AzSelfHelpSolution](New-AzSelfHelpSolution.md) -Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. \
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. @@ -74,7 +74,7 @@ In the absence of the ‘requiredParameters’ it is likely that some of the sol ‘requiredParameters’ from the Solutions response is the same as ‘properties.parameters’ in the request for Troubleshooters ### [New-AzSelfHelpTroubleshooter](New-AzSelfHelpTroubleshooter.md) -Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. +create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. \
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. @@ -88,5 +88,5 @@ The old resource name is obsolete after this API is invoked. Ends the troubleshooter action ### [Update-AzSelfHelpSolution](Update-AzSelfHelpSolution.md) -Update the requiredInputs or additional information needed to execute the solution +update the requiredInputs or additional information needed to execute the solution diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpDiagnostic.md b/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpDiagnostic.md index ea3a87a229a0..03bf377f76cb 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpDiagnostic.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpDiagnostic.md @@ -61,7 +61,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -114,7 +113,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpDiscoverySolution.md b/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpDiscoverySolution.md index 3ae79be9562d..d12456a0a818 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpDiscoverySolution.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpDiscoverySolution.md @@ -97,7 +97,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpSimplifiedSolution.md b/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpSimplifiedSolution.md index 26196808b7e6..06f8dfc83d80 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpSimplifiedSolution.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpSimplifiedSolution.md @@ -64,7 +64,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -117,7 +116,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpSolution.md index 63444d9b5f5b..f64482f138a3 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpSolution.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpSolution.md @@ -61,7 +61,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -114,7 +113,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpSolutionSelfHelp.md b/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpSolutionSelfHelp.md index 6c735cb6ca4f..3651d9e82982 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpSolutionSelfHelp.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpSolutionSelfHelp.md @@ -64,7 +64,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -103,7 +102,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpTroubleshooter.md index 21abd95a55a0..4269cf01e556 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpTroubleshooter.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Get-AzSelfHelpTroubleshooter.md @@ -9,7 +9,7 @@ schema: 2.0.0 ## SYNOPSIS Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.\
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. -This API requires the Troubleshooter resource name that was created using the Create API. +This API requires the Troubleshooter resource name that was created using the get API. ## SYNTAX @@ -26,7 +26,7 @@ Get-AzSelfHelpTroubleshooter -InputObject [-DefaultProfile < ## DESCRIPTION Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.\
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. -This API requires the Troubleshooter resource name that was created using the Create API. +This API requires the Troubleshooter resource name that was created using the get API. ## EXAMPLES @@ -65,7 +65,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -118,7 +117,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpCheckNameAvailability.md b/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpCheckNameAvailability.md index d883e02db2dd..1d58fa256b69 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpCheckNameAvailability.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpCheckNameAvailability.md @@ -25,17 +25,16 @@ Invoke-AzSelfHelpCheckNameAvailability -Scope [-WhatIf] [] ``` -### PostViaIdentity +### PostViaJsonFilePath ``` -Invoke-AzSelfHelpCheckNameAvailability -InputObject - -CheckNameAvailabilityRequest [-DefaultProfile ] [-Confirm] - [-WhatIf] [] +Invoke-AzSelfHelpCheckNameAvailability -Scope -JsonFilePath [-DefaultProfile ] + [-Confirm] [-WhatIf] [] ``` -### PostViaIdentityExpanded +### PostViaJsonString ``` -Invoke-AzSelfHelpCheckNameAvailability -InputObject [-Name ] [-Type ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] +Invoke-AzSelfHelpCheckNameAvailability -Scope -JsonString [-DefaultProfile ] + [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -67,11 +66,10 @@ Checks if resource name is avilabale/unique for the scope or not ### -CheckNameAvailabilityRequest The check availability request body. -To construct, see NOTES section for CHECKNAMEAVAILABILITYREQUEST properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest -Parameter Sets: Post, PostViaIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest +Parameter Sets: Post Aliases: Required: True @@ -97,19 +95,33 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +### -JsonFilePath +Path of Json file supplied to the Post operation ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity -Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Type: System.String +Parameter Sets: PostViaJsonFilePath Aliases: Required: True Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Post operation + +```yaml +Type: System.String +Parameter Sets: PostViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False Accept wildcard characters: False ``` @@ -118,7 +130,7 @@ The name of the resource for which availability needs to be checked. ```yaml Type: System.String -Parameter Sets: PostExpanded, PostViaIdentityExpanded +Parameter Sets: PostExpanded Aliases: Required: False @@ -133,7 +145,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: Post, PostExpanded +Parameter Sets: (All) Aliases: Required: True @@ -148,7 +160,7 @@ The resource type. ```yaml Type: System.String -Parameter Sets: PostExpanded, PostViaIdentityExpanded +Parameter Sets: PostExpanded Aliases: Required: False @@ -194,13 +206,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest - -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpContinueTroubleshooter.md b/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpContinueTroubleshooter.md index e9cc6bc27bd9..cbf5ea2bcddb 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpContinueTroubleshooter.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpContinueTroubleshooter.md @@ -10,7 +10,7 @@ schema: 2.0.0 ## SYNOPSIS Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. \
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. -This API is used after the Troubleshooter has been created using the Create API. +This API is used after the Troubleshooter has been created using the continue API. ## SYNTAX @@ -42,10 +42,22 @@ Invoke-AzSelfHelpContinueTroubleshooter -InputObject [-Confirm] [-WhatIf] [] ``` +### ContinueViaJsonFilePath +``` +Invoke-AzSelfHelpContinueTroubleshooter -Scope -TroubleshooterName -JsonFilePath + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### ContinueViaJsonString +``` +Invoke-AzSelfHelpContinueTroubleshooter -Scope -TroubleshooterName -JsonString + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Uses ‘stepId’ and ‘responses’ as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. \
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. -This API is used after the Troubleshooter has been created using the Create API. +This API is used after the Troubleshooter has been created using the continue API. ## EXAMPLES @@ -70,10 +82,9 @@ You can see the status of the troubleshooter step by using `Get-AzSelfHelpTroubl ### -ContinueRequestBody Troubleshooter ContinueRequest body. -To construct, see NOTES section for CONTINUEREQUESTBODY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody Parameter Sets: Continue, ContinueViaIdentity Aliases: @@ -102,7 +113,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -116,6 +126,36 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Continue operation + +```yaml +Type: System.String +Parameter Sets: ContinueViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Continue operation + +```yaml +Type: System.String +Parameter Sets: ContinueViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PassThru Returns true when the command succeeds @@ -133,10 +173,9 @@ Accept wildcard characters: False ### -Response . -To construct, see NOTES section for RESPONSE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse[] Parameter Sets: ContinueExpanded, ContinueViaIdentityExpanded Aliases: @@ -152,7 +191,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: Continue, ContinueExpanded +Parameter Sets: Continue, ContinueExpanded, ContinueViaJsonFilePath, ContinueViaJsonString Aliases: Required: True @@ -182,7 +221,7 @@ Troubleshooter resource Name. ```yaml Type: System.String -Parameter Sets: Continue, ContinueExpanded +Parameter Sets: Continue, ContinueExpanded, ContinueViaJsonFilePath, ContinueViaJsonString Aliases: Required: True @@ -228,7 +267,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody ### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md b/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md index b6cb6d91e89f..b118f253b17a 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md @@ -25,17 +25,15 @@ Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -DiscoverSolutionRequest [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` -### PostViaIdentity +### PostViaJsonFilePath ``` -Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -InputObject - -DiscoverSolutionRequest [-DefaultProfile ] [-Confirm] [-WhatIf] - [] +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -JsonFilePath [-SubscriptionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` -### PostViaIdentityExpanded +### PostViaJsonString ``` -Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -InputObject - [-AdditionalContext ] [-IssueSummary ] [-ResourceId ] [-ServiceId ] +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -JsonString [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` @@ -62,7 +60,7 @@ Additional information in the form of a string. ```yaml Type: System.String -Parameter Sets: PostExpanded, PostViaIdentityExpanded +Parameter Sets: PostExpanded Aliases: Required: False @@ -90,11 +88,10 @@ Accept wildcard characters: False ### -DiscoverSolutionRequest Discover NLP request. -To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest -Parameter Sets: Post, PostViaIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest +Parameter Sets: Post Aliases: Required: True @@ -104,31 +101,45 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +### -IssueSummary +Describe the issue with the affected resource. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity -Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Type: System.String +Parameter Sets: PostExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Post operation + +```yaml +Type: System.String +Parameter Sets: PostViaJsonFilePath Aliases: Required: True Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False Accept wildcard characters: False ``` -### -IssueSummary -Describe the issue with the affected resource. +### -JsonString +Json string supplied to the Post operation ```yaml Type: System.String -Parameter Sets: PostExpanded, PostViaIdentityExpanded +Parameter Sets: PostViaJsonString Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -140,7 +151,7 @@ Provide resourceId of affected resource ```yaml Type: System.String -Parameter Sets: PostExpanded, PostViaIdentityExpanded +Parameter Sets: PostExpanded Aliases: Required: False @@ -152,11 +163,11 @@ Accept wildcard characters: False ### -ServiceId Service Classification id for the resource. -You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response +You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response ```yaml Type: System.String -Parameter Sets: PostExpanded, PostViaIdentityExpanded +Parameter Sets: PostExpanded Aliases: Required: False @@ -172,7 +183,7 @@ The value must be an UUID. ```yaml Type: System.String -Parameter Sets: Post, PostExpanded +Parameter Sets: (All) Aliases: Required: False @@ -218,13 +229,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest - -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md b/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md index 2205c082f1b5..e67bd362887e 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md @@ -25,6 +25,18 @@ Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -DiscoverSolutionRequest ] [-Confirm] [-WhatIf] [] ``` +### PostViaJsonFilePath +``` +Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -JsonFilePath [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### PostViaJsonString +``` +Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -JsonString [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + ## DESCRIPTION Solution discovery using natural language processing. @@ -76,10 +88,9 @@ Accept wildcard characters: False ### -DiscoverSolutionRequest Discover NLP request. -To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest Parameter Sets: Post Aliases: @@ -105,6 +116,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Post operation + +```yaml +Type: System.String +Parameter Sets: PostViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Post operation + +```yaml +Type: System.String +Parameter Sets: PostViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceId Provide resourceId of affected resource @@ -122,7 +163,7 @@ Accept wildcard characters: False ### -ServiceId Service Classification id for the resource. -You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/listtabs=HTTP Service Id is the GUID which can be found under name field in Services List response +You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response ```yaml Type: System.String @@ -172,11 +213,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpWarmSolutionUp.md b/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpWarmSolutionUp.md index 56d728a725ad..56d042dd6134 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpWarmSolutionUp.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Invoke-AzSelfHelpWarmSolutionUp.md @@ -38,6 +38,18 @@ Invoke-AzSelfHelpWarmSolutionUp -InputObject [-Parameter ] [-PassThru] [-Confirm] [-WhatIf] [] ``` +### WarmViaJsonFilePath +``` +Invoke-AzSelfHelpWarmSolutionUp -Scope -SolutionResourceName -JsonFilePath + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### WarmViaJsonString +``` +Invoke-AzSelfHelpWarmSolutionUp -Scope -SolutionResourceName -JsonString + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Warm up the solution resource by preloading asynchronous diagnostics results into cache @@ -78,7 +90,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -92,6 +103,36 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Warm operation + +```yaml +Type: System.String +Parameter Sets: WarmViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Warm operation + +```yaml +Type: System.String +Parameter Sets: WarmViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Parameter Dictionary of \ @@ -127,7 +168,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: Warm, WarmExpanded +Parameter Sets: Warm, WarmExpanded, WarmViaJsonFilePath, WarmViaJsonString Aliases: Required: True @@ -142,7 +183,7 @@ Solution resource Name. ```yaml Type: System.String -Parameter Sets: Warm, WarmExpanded +Parameter Sets: Warm, WarmExpanded, WarmViaJsonFilePath, WarmViaJsonString Aliases: Required: True @@ -154,10 +195,9 @@ Accept wildcard characters: False ### -SolutionWarmUpRequestBody Solution WarmUpRequest body -To construct, see NOTES section for SOLUTIONWARMUPREQUESTBODY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody Parameter Sets: Warm, WarmViaIdentity Aliases: @@ -204,10 +244,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody - ### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody + ## OUTPUTS ### System.Boolean diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpDiagnostic.md b/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpDiagnostic.md index c758a3ef206a..77855075d4d9 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpDiagnostic.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpDiagnostic.md @@ -8,19 +8,39 @@ schema: 2.0.0 # New-AzSelfHelpDiagnostic ## SYNOPSIS -Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. \
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.\
\
\Note: \ ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. ## SYNTAX +### CreateExpanded (Default) ``` New-AzSelfHelpDiagnostic -Scope -SResourceName [-GlobalParameter ] [-Insight ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` +### CreateViaIdentityExpanded +``` +New-AzSelfHelpDiagnostic -InputObject [-GlobalParameter ] + [-Insight ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaJsonFilePath +``` +New-AzSelfHelpDiagnostic -Scope -SResourceName -JsonFilePath + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzSelfHelpDiagnostic -Scope -SResourceName -JsonString + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION -Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. \
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.\
\
\Note: \ ‘requiredInputs’ from Discovery solutions response must be passed via ‘additionalParameters’ as an input to Diagnostics API. ## EXAMPLES @@ -79,7 +99,7 @@ Global parameters is an optional map which can be used to add key and value to r ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -89,13 +109,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: CreateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -Insight SolutionIds that are needed to be invoked. -To construct, see NOTES section for INSIGHT properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation[] +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -105,6 +139,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NoWait Run the command asynchronously @@ -125,7 +189,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString Aliases: Required: True @@ -140,7 +204,7 @@ Unique resource name for insight resources ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString Aliases: DiagnosticsResourceName Required: True @@ -186,9 +250,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpSimplifiedSolution.md b/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpSimplifiedSolution.md index 35133cb9b4f3..d8ecc91cac55 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpSimplifiedSolution.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpSimplifiedSolution.md @@ -8,7 +8,7 @@ schema: 2.0.0 # New-AzSelfHelpSimplifiedSolution ## SYNOPSIS -Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +create a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. \
\
\Note:\ \
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API. @@ -16,14 +16,34 @@ In the absence of the ‘Parameters’ it is likely that some of the simplified ## SYNTAX +### CreateExpanded (Default) ``` New-AzSelfHelpSimplifiedSolution -Scope -SResourceName [-Parameter ] [-SolutionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` +### CreateViaIdentityExpanded +``` +New-AzSelfHelpSimplifiedSolution -InputObject [-Parameter ] + [-SolutionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaJsonFilePath +``` +New-AzSelfHelpSimplifiedSolution -Scope -SResourceName -JsonFilePath + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzSelfHelpSimplifiedSolution -Scope -SResourceName -JsonString + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION -Creates a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +create a simplified Solutions for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. In the absence of the ‘Parameters’ it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. \
\
\Note:\ \
1. ‘requiredInputs’ from Discovery solutions response must be passed via ‘parameters’ in the request body of simplified Solutions API. @@ -84,6 +104,51 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: CreateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NoWait Run the command asynchronously @@ -104,7 +169,7 @@ Client input parameters to run Simplified Solutions ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -119,7 +184,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString Aliases: Required: True @@ -134,7 +199,7 @@ Solution Id to identify single Simplified Solution. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -149,7 +214,7 @@ Simplified Solutions Resource Name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString Aliases: SimplifiedSolutionsResourceName Required: True @@ -195,9 +260,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpSolution.md index 1c2c86acf277..60d8b856a5ad 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpSolution.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpSolution.md @@ -8,7 +8,7 @@ schema: 2.0.0 # New-AzSelfHelpSolution ## SYNOPSIS -Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. \
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. @@ -22,14 +22,34 @@ In the absence of the ‘requiredParameters’ it is likely that some of the sol ## SYNTAX +### CreateExpanded (Default) ``` New-AzSelfHelpSolution -ResourceName -Scope [-Parameter ] [-TriggerCriterion ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` +### CreateViaIdentityExpanded +``` +New-AzSelfHelpSolution -InputObject [-Parameter ] + [-TriggerCriterion ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSelfHelpSolution -ResourceName -Scope -JsonFilePath + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzSelfHelpSolution -ResourceName -Scope -JsonString + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION -Creates a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. +create a solution for the specific Azure resource or subscription using the inputs ‘solutionId and requiredInputs’ from discovery solutions. \
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. @@ -98,6 +118,51 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: CreateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NoWait Run the command asynchronously @@ -118,7 +183,7 @@ Client input parameters to run Solution ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -133,7 +198,7 @@ Solution resource Name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString Aliases: SolutionResourceName Required: True @@ -148,7 +213,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString Aliases: Required: True @@ -160,11 +225,10 @@ Accept wildcard characters: False ### -TriggerCriterion Solution request trigger criteria -To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion[] +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -210,9 +274,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpTroubleshooter.md index d2b52f775bd9..7e035415f0b1 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpTroubleshooter.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/New-AzSelfHelpTroubleshooter.md @@ -8,7 +8,7 @@ schema: 2.0.0 # New-AzSelfHelpTroubleshooter ## SYNOPSIS -Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. +create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. \
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. @@ -16,13 +16,32 @@ Troubleshooters terminate at a well curated solution based off of resource backe ## SYNTAX +### CreateExpanded (Default) ``` New-AzSelfHelpTroubleshooter -Name -Scope [-Parameter ] [-SolutionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` +### CreateViaIdentityExpanded +``` +New-AzSelfHelpTroubleshooter -InputObject [-Parameter ] [-SolutionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSelfHelpTroubleshooter -Name -Scope -JsonFilePath + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzSelfHelpTroubleshooter -Name -Scope -JsonString [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION -Creates the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. +create the specific troubleshooter action under a resource or subscription using the ‘solutionId’ and ‘properties.parameters’ as the trigger. \
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. @@ -66,12 +85,57 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: CreateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Name Troubleshooter resource Name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString Aliases: TroubleshooterName Required: True @@ -86,7 +150,7 @@ Client input parameters to run Troubleshooter Resource ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -101,7 +165,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString Aliases: Required: True @@ -116,7 +180,7 @@ Solution Id to identify single troubleshooter. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -162,9 +226,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Restart-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp.Autorest/docs/Restart-AzSelfHelpTroubleshooter.md index bf040bb10584..c389943dbb2a 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Restart-AzSelfHelpTroubleshooter.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Restart-AzSelfHelpTroubleshooter.md @@ -69,7 +69,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -153,7 +152,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Stop-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp.Autorest/docs/Stop-AzSelfHelpTroubleshooter.md index 5a3694d583d3..8fb5f6b10a58 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Stop-AzSelfHelpTroubleshooter.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Stop-AzSelfHelpTroubleshooter.md @@ -60,7 +60,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity diff --git a/src/SelfHelp/SelfHelp.Autorest/docs/Update-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp.Autorest/docs/Update-AzSelfHelpSolution.md index cc4d217d979f..73cb87a922b0 100644 --- a/src/SelfHelp/SelfHelp.Autorest/docs/Update-AzSelfHelpSolution.md +++ b/src/SelfHelp/SelfHelp.Autorest/docs/Update-AzSelfHelpSolution.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Update-AzSelfHelpSolution ## SYNOPSIS -Update the requiredInputs or additional information needed to execute the solution +update the requiredInputs or additional information needed to execute the solution ## SYNTAX @@ -26,8 +26,20 @@ Update-AzSelfHelpSolution -InputObject [-Parameter ] ``` +### UpdateViaJsonFilePath +``` +Update-AzSelfHelpSolution -ResourceName -Scope -JsonFilePath + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonString +``` +Update-AzSelfHelpSolution -ResourceName -Scope -JsonString + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION -Update the requiredInputs or additional information needed to execute the solution +update the requiredInputs or additional information needed to execute the solution ## EXAMPLES @@ -86,7 +98,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -100,6 +111,36 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NoWait Run the command asynchronously @@ -120,7 +161,7 @@ Client input parameters to run Solution ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -135,7 +176,7 @@ Solution resource Name. ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString Aliases: SolutionResourceName Required: True @@ -150,7 +191,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString Aliases: Required: True @@ -162,11 +203,10 @@ Accept wildcard characters: False ### -TriggerCriterion Solution request trigger criteria -To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -216,7 +256,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource ## NOTES diff --git a/src/SelfHelp/SelfHelp.Autorest/generate-info.json b/src/SelfHelp/SelfHelp.Autorest/generate-info.json index c3115e8be3e7..c8dbd3a63439 100644 --- a/src/SelfHelp/SelfHelp.Autorest/generate-info.json +++ b/src/SelfHelp/SelfHelp.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "673a2be0-2ac0-446e-a557-5cb7bd0bec5c" + "generate_Id": "14962a8a-9a35-47c6-8892-dc7a0a2fde6e" } diff --git a/src/SelfHelp/SelfHelp.Autorest/resources/README.md b/src/SelfHelp/SelfHelp.Autorest/resources/README.md new file mode 100644 index 000000000000..937f07f8fec2 --- /dev/null +++ b/src/SelfHelp/SelfHelp.Autorest/resources/README.md @@ -0,0 +1,11 @@ +# Resources +This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder. + +## Info +- Modifiable: yes +- Generated: no +- Committed: yes +- Packaged: no + +## Purpose +Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact. \ No newline at end of file diff --git a/src/SelfHelp/SelfHelp.sln b/src/SelfHelp/SelfHelp.sln index 0d5df0f4f669..38fb1d0a954a 100644 --- a/src/SelfHelp/SelfHelp.sln +++ b/src/SelfHelp/SelfHelp.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 @@ -19,49 +19,119 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accoun EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SelfHelp", "SelfHelp\SelfHelp.csproj", "{FAB33C2B-CCA9-4DD5-9013-8845672F878B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.SelfHelp", "..\..\generated\SelfHelp\SelfHelp.Autorest\Az.SelfHelp.csproj", "{F6B61F7E-C2DB-4854-A574-9AFD0BE59DB7}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SelfHelp.Autorest", "SelfHelp.Autorest", "{A4CA456C-04BD-49E7-5DB8-F4CE92DBC1DA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.SelfHelp", "..\..\generated\SelfHelp\SelfHelp.Autorest\Az.SelfHelp.csproj", "{4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {9CCD204D-1E93-42B0-B792-7BFCF7461384}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9CCD204D-1E93-42B0-B792-7BFCF7461384}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CCD204D-1E93-42B0-B792-7BFCF7461384}.Debug|x64.ActiveCfg = Debug|Any CPU + {9CCD204D-1E93-42B0-B792-7BFCF7461384}.Debug|x64.Build.0 = Debug|Any CPU + {9CCD204D-1E93-42B0-B792-7BFCF7461384}.Debug|x86.ActiveCfg = Debug|Any CPU + {9CCD204D-1E93-42B0-B792-7BFCF7461384}.Debug|x86.Build.0 = Debug|Any CPU {9CCD204D-1E93-42B0-B792-7BFCF7461384}.Release|Any CPU.ActiveCfg = Release|Any CPU {9CCD204D-1E93-42B0-B792-7BFCF7461384}.Release|Any CPU.Build.0 = Release|Any CPU + {9CCD204D-1E93-42B0-B792-7BFCF7461384}.Release|x64.ActiveCfg = Release|Any CPU + {9CCD204D-1E93-42B0-B792-7BFCF7461384}.Release|x64.Build.0 = Release|Any CPU + {9CCD204D-1E93-42B0-B792-7BFCF7461384}.Release|x86.ActiveCfg = Release|Any CPU + {9CCD204D-1E93-42B0-B792-7BFCF7461384}.Release|x86.Build.0 = Release|Any CPU {2BA444C3-ECCB-4D50-89FA-F7446AD4E26A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2BA444C3-ECCB-4D50-89FA-F7446AD4E26A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2BA444C3-ECCB-4D50-89FA-F7446AD4E26A}.Debug|x64.ActiveCfg = Debug|Any CPU + {2BA444C3-ECCB-4D50-89FA-F7446AD4E26A}.Debug|x64.Build.0 = Debug|Any CPU + {2BA444C3-ECCB-4D50-89FA-F7446AD4E26A}.Debug|x86.ActiveCfg = Debug|Any CPU + {2BA444C3-ECCB-4D50-89FA-F7446AD4E26A}.Debug|x86.Build.0 = Debug|Any CPU {2BA444C3-ECCB-4D50-89FA-F7446AD4E26A}.Release|Any CPU.ActiveCfg = Release|Any CPU {2BA444C3-ECCB-4D50-89FA-F7446AD4E26A}.Release|Any CPU.Build.0 = Release|Any CPU + {2BA444C3-ECCB-4D50-89FA-F7446AD4E26A}.Release|x64.ActiveCfg = Release|Any CPU + {2BA444C3-ECCB-4D50-89FA-F7446AD4E26A}.Release|x64.Build.0 = Release|Any CPU + {2BA444C3-ECCB-4D50-89FA-F7446AD4E26A}.Release|x86.ActiveCfg = Release|Any CPU + {2BA444C3-ECCB-4D50-89FA-F7446AD4E26A}.Release|x86.Build.0 = Release|Any CPU {8C2A53F5-FD92-4FE4-9C7F-713B31B2C09B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8C2A53F5-FD92-4FE4-9C7F-713B31B2C09B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C2A53F5-FD92-4FE4-9C7F-713B31B2C09B}.Debug|x64.ActiveCfg = Debug|Any CPU + {8C2A53F5-FD92-4FE4-9C7F-713B31B2C09B}.Debug|x64.Build.0 = Debug|Any CPU + {8C2A53F5-FD92-4FE4-9C7F-713B31B2C09B}.Debug|x86.ActiveCfg = Debug|Any CPU + {8C2A53F5-FD92-4FE4-9C7F-713B31B2C09B}.Debug|x86.Build.0 = Debug|Any CPU {8C2A53F5-FD92-4FE4-9C7F-713B31B2C09B}.Release|Any CPU.ActiveCfg = Release|Any CPU {8C2A53F5-FD92-4FE4-9C7F-713B31B2C09B}.Release|Any CPU.Build.0 = Release|Any CPU + {8C2A53F5-FD92-4FE4-9C7F-713B31B2C09B}.Release|x64.ActiveCfg = Release|Any CPU + {8C2A53F5-FD92-4FE4-9C7F-713B31B2C09B}.Release|x64.Build.0 = Release|Any CPU + {8C2A53F5-FD92-4FE4-9C7F-713B31B2C09B}.Release|x86.ActiveCfg = Release|Any CPU + {8C2A53F5-FD92-4FE4-9C7F-713B31B2C09B}.Release|x86.Build.0 = Release|Any CPU {CC6D5DC9-4969-4B34-B356-917B3B69E9B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CC6D5DC9-4969-4B34-B356-917B3B69E9B7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC6D5DC9-4969-4B34-B356-917B3B69E9B7}.Debug|x64.ActiveCfg = Debug|Any CPU + {CC6D5DC9-4969-4B34-B356-917B3B69E9B7}.Debug|x64.Build.0 = Debug|Any CPU + {CC6D5DC9-4969-4B34-B356-917B3B69E9B7}.Debug|x86.ActiveCfg = Debug|Any CPU + {CC6D5DC9-4969-4B34-B356-917B3B69E9B7}.Debug|x86.Build.0 = Debug|Any CPU {CC6D5DC9-4969-4B34-B356-917B3B69E9B7}.Release|Any CPU.ActiveCfg = Release|Any CPU {CC6D5DC9-4969-4B34-B356-917B3B69E9B7}.Release|Any CPU.Build.0 = Release|Any CPU + {CC6D5DC9-4969-4B34-B356-917B3B69E9B7}.Release|x64.ActiveCfg = Release|Any CPU + {CC6D5DC9-4969-4B34-B356-917B3B69E9B7}.Release|x64.Build.0 = Release|Any CPU + {CC6D5DC9-4969-4B34-B356-917B3B69E9B7}.Release|x86.ActiveCfg = Release|Any CPU + {CC6D5DC9-4969-4B34-B356-917B3B69E9B7}.Release|x86.Build.0 = Release|Any CPU {9337614C-A070-495C-AED4-3053E0DD2A6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9337614C-A070-495C-AED4-3053E0DD2A6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9337614C-A070-495C-AED4-3053E0DD2A6A}.Debug|x64.ActiveCfg = Debug|Any CPU + {9337614C-A070-495C-AED4-3053E0DD2A6A}.Debug|x64.Build.0 = Debug|Any CPU + {9337614C-A070-495C-AED4-3053E0DD2A6A}.Debug|x86.ActiveCfg = Debug|Any CPU + {9337614C-A070-495C-AED4-3053E0DD2A6A}.Debug|x86.Build.0 = Debug|Any CPU {9337614C-A070-495C-AED4-3053E0DD2A6A}.Release|Any CPU.ActiveCfg = Release|Any CPU {9337614C-A070-495C-AED4-3053E0DD2A6A}.Release|Any CPU.Build.0 = Release|Any CPU + {9337614C-A070-495C-AED4-3053E0DD2A6A}.Release|x64.ActiveCfg = Release|Any CPU + {9337614C-A070-495C-AED4-3053E0DD2A6A}.Release|x64.Build.0 = Release|Any CPU + {9337614C-A070-495C-AED4-3053E0DD2A6A}.Release|x86.ActiveCfg = Release|Any CPU + {9337614C-A070-495C-AED4-3053E0DD2A6A}.Release|x86.Build.0 = Release|Any CPU {063580AB-5E1E-4FBD-A9F8-EF6498B0466B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {063580AB-5E1E-4FBD-A9F8-EF6498B0466B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {063580AB-5E1E-4FBD-A9F8-EF6498B0466B}.Debug|x64.ActiveCfg = Debug|Any CPU + {063580AB-5E1E-4FBD-A9F8-EF6498B0466B}.Debug|x64.Build.0 = Debug|Any CPU + {063580AB-5E1E-4FBD-A9F8-EF6498B0466B}.Debug|x86.ActiveCfg = Debug|Any CPU + {063580AB-5E1E-4FBD-A9F8-EF6498B0466B}.Debug|x86.Build.0 = Debug|Any CPU {063580AB-5E1E-4FBD-A9F8-EF6498B0466B}.Release|Any CPU.ActiveCfg = Release|Any CPU {063580AB-5E1E-4FBD-A9F8-EF6498B0466B}.Release|Any CPU.Build.0 = Release|Any CPU + {063580AB-5E1E-4FBD-A9F8-EF6498B0466B}.Release|x64.ActiveCfg = Release|Any CPU + {063580AB-5E1E-4FBD-A9F8-EF6498B0466B}.Release|x64.Build.0 = Release|Any CPU + {063580AB-5E1E-4FBD-A9F8-EF6498B0466B}.Release|x86.ActiveCfg = Release|Any CPU + {063580AB-5E1E-4FBD-A9F8-EF6498B0466B}.Release|x86.Build.0 = Release|Any CPU {FAB33C2B-CCA9-4DD5-9013-8845672F878B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FAB33C2B-CCA9-4DD5-9013-8845672F878B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FAB33C2B-CCA9-4DD5-9013-8845672F878B}.Debug|x64.ActiveCfg = Debug|Any CPU + {FAB33C2B-CCA9-4DD5-9013-8845672F878B}.Debug|x64.Build.0 = Debug|Any CPU + {FAB33C2B-CCA9-4DD5-9013-8845672F878B}.Debug|x86.ActiveCfg = Debug|Any CPU + {FAB33C2B-CCA9-4DD5-9013-8845672F878B}.Debug|x86.Build.0 = Debug|Any CPU {FAB33C2B-CCA9-4DD5-9013-8845672F878B}.Release|Any CPU.ActiveCfg = Release|Any CPU {FAB33C2B-CCA9-4DD5-9013-8845672F878B}.Release|Any CPU.Build.0 = Release|Any CPU - {F6B61F7E-C2DB-4854-A574-9AFD0BE59DB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F6B61F7E-C2DB-4854-A574-9AFD0BE59DB7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F6B61F7E-C2DB-4854-A574-9AFD0BE59DB7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F6B61F7E-C2DB-4854-A574-9AFD0BE59DB7}.Release|Any CPU.Build.0 = Release|Any CPU + {FAB33C2B-CCA9-4DD5-9013-8845672F878B}.Release|x64.ActiveCfg = Release|Any CPU + {FAB33C2B-CCA9-4DD5-9013-8845672F878B}.Release|x64.Build.0 = Release|Any CPU + {FAB33C2B-CCA9-4DD5-9013-8845672F878B}.Release|x86.ActiveCfg = Release|Any CPU + {FAB33C2B-CCA9-4DD5-9013-8845672F878B}.Release|x86.Build.0 = Release|Any CPU + {4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3}.Debug|x64.ActiveCfg = Debug|Any CPU + {4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3}.Debug|x64.Build.0 = Debug|Any CPU + {4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3}.Debug|x86.ActiveCfg = Debug|Any CPU + {4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3}.Debug|x86.Build.0 = Debug|Any CPU + {4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3}.Release|Any CPU.Build.0 = Release|Any CPU + {4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3}.Release|x64.ActiveCfg = Release|Any CPU + {4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3}.Release|x64.Build.0 = Release|Any CPU + {4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3}.Release|x86.ActiveCfg = Release|Any CPU + {4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {9CCD204D-1E93-42B0-B792-7BFCF7461384} = {EAEC5C8A-2B43-4894-91D7-2216FF9613C2} @@ -70,5 +140,6 @@ Global {CC6D5DC9-4969-4B34-B356-917B3B69E9B7} = {EAEC5C8A-2B43-4894-91D7-2216FF9613C2} {9337614C-A070-495C-AED4-3053E0DD2A6A} = {EAEC5C8A-2B43-4894-91D7-2216FF9613C2} {063580AB-5E1E-4FBD-A9F8-EF6498B0466B} = {EAEC5C8A-2B43-4894-91D7-2216FF9613C2} + {4B5537D0-906A-4EB0-AAEC-B6EF26CFD5D3} = {A4CA456C-04BD-49E7-5DB8-F4CE92DBC1DA} EndGlobalSection EndGlobal diff --git a/src/SelfHelp/SelfHelp/Az.SelfHelp.psd1 b/src/SelfHelp/SelfHelp/Az.SelfHelp.psd1 index 2c639b8a848a..1ed14273259e 100644 --- a/src/SelfHelp/SelfHelp/Az.SelfHelp.psd1 +++ b/src/SelfHelp/SelfHelp/Az.SelfHelp.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 1/9/2025 +# Generated on: 5/26/2025 # @{ @@ -51,16 +51,16 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '4.0.1'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.0.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'SelfHelp.Autorest/bin/Az.SelfHelp.private.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() +ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() +TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module FormatsToProcess = 'SelfHelp.Autorest/Az.SelfHelp.format.ps1xml' @@ -105,7 +105,7 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','PSModule','SelfHelp' + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'SelfHelp' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -130,7 +130,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/SelfHelp/SelfHelp/ChangeLog.md b/src/SelfHelp/SelfHelp/ChangeLog.md index 04a4a9b18b8d..39883b50fa46 100644 --- a/src/SelfHelp/SelfHelp/ChangeLog.md +++ b/src/SelfHelp/SelfHelp/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Introduced various new features by upgrading code generator. Please see details [here](https://github.com/Azure/azure-powershell/blob/main/documentation/Autorest-powershell-v4-new-features.md). ## Version 0.2.1 * Upgraded nuget package to signed package. diff --git a/src/SelfHelp/SelfHelp/help/Az.SelfHelp.md b/src/SelfHelp/SelfHelp/help/Az.SelfHelp.md index 0cf68c4150af..495e76828d45 100644 --- a/src/SelfHelp/SelfHelp/help/Az.SelfHelp.md +++ b/src/SelfHelp/SelfHelp/help/Az.SelfHelp.md @@ -30,7 +30,7 @@ These are static self help content to help users troubleshoot their issues. ### [Get-AzSelfHelpTroubleshooter](Get-AzSelfHelpTroubleshooter.md) Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.\
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. -This API requires the Troubleshooter resource name that was created using the Create API. +This API requires the Troubleshooter resource name that was created using the get API. ### [Invoke-AzSelfHelpCheckNameAvailability](Invoke-AzSelfHelpCheckNameAvailability.md) This API is used to check the uniqueness of a resource name used for a diagnostic, troubleshooter or solutions @@ -38,7 +38,7 @@ This API is used to check the uniqueness of a resource name used for a diagnosti ### [Invoke-AzSelfHelpContinueTroubleshooter](Invoke-AzSelfHelpContinueTroubleshooter.md) Uses 'stepId' and 'responses' as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. \
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. -This API is used after the Troubleshooter has been created using the Create API. +This API is used after the Troubleshooter has been created using the continue API. ### [Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope](Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md) Solution discovery using natural language processing. @@ -50,18 +50,18 @@ Solution discovery using natural language processing. Warm up the solution resource by preloading asynchronous diagnostics results into cache ### [New-AzSelfHelpDiagnostic](New-AzSelfHelpDiagnostic.md) -Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. \
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.\
\
\Note: \ 'requiredInputs' from Discovery solutions response must be passed via 'additionalParameters' as an input to Diagnostics API. ### [New-AzSelfHelpSimplifiedSolution](New-AzSelfHelpSimplifiedSolution.md) -Creates a simplified Solutions for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. +create a simplified Solutions for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. In the absence of the 'Parameters' it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. \
\
\Note:\ \
1. 'requiredInputs' from Discovery solutions response must be passed via 'parameters' in the request body of simplified Solutions API. \
### [New-AzSelfHelpSolution](New-AzSelfHelpSolution.md) -Creates a solution for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. +create a solution for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. \
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. @@ -74,7 +74,7 @@ In the absence of the 'requiredParameters' it is likely that some of the solutio 'requiredParameters' from the Solutions response is the same as 'properties.parameters' in the request for Troubleshooters ### [New-AzSelfHelpTroubleshooter](New-AzSelfHelpTroubleshooter.md) -Creates the specific troubleshooter action under a resource or subscription using the 'solutionId' and 'properties.parameters' as the trigger. +create the specific troubleshooter action under a resource or subscription using the 'solutionId' and 'properties.parameters' as the trigger. \
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. @@ -88,5 +88,5 @@ The old resource name is obsolete after this API is invoked. Ends the troubleshooter action ### [Update-AzSelfHelpSolution](Update-AzSelfHelpSolution.md) -Update the requiredInputs or additional information needed to execute the solution +update the requiredInputs or additional information needed to execute the solution diff --git a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiagnostic.md b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiagnostic.md index 24ec03a2f2d0..b072a1f893a5 100644 --- a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiagnostic.md +++ b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiagnostic.md @@ -62,7 +62,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -115,7 +114,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiscoverySolution.md b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiscoverySolution.md index bbf71e7fc380..d1eff4e95c43 100644 --- a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiscoverySolution.md +++ b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpDiscoverySolution.md @@ -97,7 +97,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionMetadataResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionMetadataResource ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSimplifiedSolution.md b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSimplifiedSolution.md index b29a7e33f742..e28913232d92 100644 --- a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSimplifiedSolution.md +++ b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSimplifiedSolution.md @@ -64,7 +64,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -117,7 +116,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolution.md index 9eb02e9e4609..39d841ec9aa8 100644 --- a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolution.md +++ b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolution.md @@ -62,7 +62,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -115,7 +114,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolutionSelfHelp.md b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolutionSelfHelp.md index fdb1098a5908..b6bc00d5031f 100644 --- a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolutionSelfHelp.md +++ b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpSolutionSelfHelp.md @@ -65,7 +65,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -104,7 +103,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResourceSelfHelp +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResourceSelfHelp ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpTroubleshooter.md index 9e01871306be..71a58d0dadb6 100644 --- a/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpTroubleshooter.md +++ b/src/SelfHelp/SelfHelp/help/Get-AzSelfHelpTroubleshooter.md @@ -9,7 +9,7 @@ schema: 2.0.0 ## SYNOPSIS Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.\
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. -This API requires the Troubleshooter resource name that was created using the Create API. +This API requires the Troubleshooter resource name that was created using the get API. ## SYNTAX @@ -27,7 +27,7 @@ Get-AzSelfHelpTroubleshooter -InputObject [-DefaultProfile < ## DESCRIPTION Gets troubleshooter instance result which includes the step status/result of the troubleshooter resource name that is being executed.\
Get API is used to retrieve the result of a Troubleshooter instance, which includes the status and result of each step in the Troubleshooter workflow. -This API requires the Troubleshooter resource name that was created using the Create API. +This API requires the Troubleshooter resource name that was created using the get API. ## EXAMPLES @@ -65,7 +65,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -118,7 +117,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpCheckNameAvailability.md b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpCheckNameAvailability.md index dcdb2dc3d50b..09752c96c5e3 100644 --- a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpCheckNameAvailability.md +++ b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpCheckNameAvailability.md @@ -25,16 +25,15 @@ Invoke-AzSelfHelpCheckNameAvailability -Scope [-WhatIf] [-Confirm] [] ``` -### PostViaIdentityExpanded +### PostViaJsonFilePath ``` -Invoke-AzSelfHelpCheckNameAvailability -InputObject [-Name ] [-Type ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] +Invoke-AzSelfHelpCheckNameAvailability -Scope -JsonFilePath [-DefaultProfile ] + [-WhatIf] [-Confirm] [] ``` -### PostViaIdentity +### PostViaJsonString ``` -Invoke-AzSelfHelpCheckNameAvailability -InputObject - -CheckNameAvailabilityRequest [-DefaultProfile ] +Invoke-AzSelfHelpCheckNameAvailability -Scope -JsonString [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -67,11 +66,10 @@ Checks if resource name is avilabale/unique for the scope or not ### -CheckNameAvailabilityRequest The check availability request body. -To construct, see NOTES section for CHECKNAMEAVAILABILITYREQUEST properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest -Parameter Sets: Post, PostViaIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest +Parameter Sets: Post Aliases: Required: True @@ -97,19 +95,33 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +### -JsonFilePath +Path of Json file supplied to the Post operation ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity -Parameter Sets: PostViaIdentityExpanded, PostViaIdentity +Type: System.String +Parameter Sets: PostViaJsonFilePath Aliases: Required: True Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Post operation + +```yaml +Type: System.String +Parameter Sets: PostViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False Accept wildcard characters: False ``` @@ -118,7 +130,7 @@ The name of the resource for which availability needs to be checked. ```yaml Type: System.String -Parameter Sets: PostExpanded, PostViaIdentityExpanded +Parameter Sets: PostExpanded Aliases: Required: False @@ -133,7 +145,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: PostExpanded, Post +Parameter Sets: (All) Aliases: Required: True @@ -148,7 +160,7 @@ The resource type. ```yaml Type: System.String -Parameter Sets: PostExpanded, PostViaIdentityExpanded +Parameter Sets: PostExpanded Aliases: Required: False @@ -194,13 +206,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api40.ICheckNameAvailabilityRequest - -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityRequest ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ICheckNameAvailabilityResponse +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ICheckNameAvailabilityResponse ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpContinueTroubleshooter.md b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpContinueTroubleshooter.md index 07339cc217e1..4911fb5fcf2e 100644 --- a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpContinueTroubleshooter.md +++ b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpContinueTroubleshooter.md @@ -10,7 +10,7 @@ schema: 2.0.0 ## SYNOPSIS Uses 'stepId' and 'responses' as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. \
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. -This API is used after the Troubleshooter has been created using the Create API. +This API is used after the Troubleshooter has been created using the continue API. ## SYNTAX @@ -21,6 +21,20 @@ Invoke-AzSelfHelpContinueTroubleshooter -Scope -TroubleshooterName ] ``` +### ContinueViaJsonString +``` +Invoke-AzSelfHelpContinueTroubleshooter -Scope -TroubleshooterName -JsonString + [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] + [] +``` + +### ContinueViaJsonFilePath +``` +Invoke-AzSelfHelpContinueTroubleshooter -Scope -TroubleshooterName -JsonFilePath + [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] + [] +``` + ### Continue ``` Invoke-AzSelfHelpContinueTroubleshooter -Scope -TroubleshooterName @@ -45,7 +59,7 @@ Invoke-AzSelfHelpContinueTroubleshooter -InputObject ## DESCRIPTION Uses 'stepId' and 'responses' as the trigger to continue the troubleshooting steps for the respective troubleshooter resource name. \
Continue API is used to provide inputs that are required for the specific troubleshooter to progress into the next step in the process. -This API is used after the Troubleshooter has been created using the Create API. +This API is used after the Troubleshooter has been created using the continue API. ## EXAMPLES @@ -70,10 +84,9 @@ You can see the status of the troubleshooter step by using `Get-AzSelfHelpTroubl ### -ContinueRequestBody Troubleshooter ContinueRequest body. -To construct, see NOTES section for CONTINUEREQUESTBODY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody Parameter Sets: Continue, ContinueViaIdentity Aliases: @@ -102,7 +115,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -116,6 +128,36 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Continue operation + +```yaml +Type: System.String +Parameter Sets: ContinueViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Continue operation + +```yaml +Type: System.String +Parameter Sets: ContinueViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PassThru Returns true when the command succeeds @@ -133,10 +175,9 @@ Accept wildcard characters: False ### -Response . -To construct, see NOTES section for RESPONSE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResponse[] +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResponse[] Parameter Sets: ContinueExpanded, ContinueViaIdentityExpanded Aliases: @@ -152,7 +193,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: ContinueExpanded, Continue +Parameter Sets: ContinueExpanded, ContinueViaJsonString, ContinueViaJsonFilePath, Continue Aliases: Required: True @@ -182,7 +223,7 @@ Troubleshooter resource Name. ```yaml Type: System.String -Parameter Sets: ContinueExpanded, Continue +Parameter Sets: ContinueExpanded, ContinueViaJsonString, ContinueViaJsonFilePath, Continue Aliases: Required: True @@ -228,7 +269,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IContinueRequestBody +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IContinueRequestBody ### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity diff --git a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md index 8fd160b3ac86..78a914b7a3b8 100644 --- a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md +++ b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope.md @@ -26,18 +26,16 @@ Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope [-SubscriptionId [-WhatIf] [-Confirm] [] ``` -### PostViaIdentityExpanded +### PostViaJsonFilePath ``` -Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -InputObject - [-AdditionalContext ] [-IssueSummary ] [-ResourceId ] [-ServiceId ] +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` -### PostViaIdentity +### PostViaJsonString ``` -Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope -InputObject - -DiscoverSolutionRequest [-DefaultProfile ] - [-WhatIf] [-Confirm] [] +Invoke-AzSelfHelpDiscoverySolutionNlpSubscriptionScope [-SubscriptionId ] -JsonString + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -63,7 +61,7 @@ Additional information in the form of a string. ```yaml Type: System.String -Parameter Sets: PostExpanded, PostViaIdentityExpanded +Parameter Sets: PostExpanded Aliases: Required: False @@ -91,11 +89,10 @@ Accept wildcard characters: False ### -DiscoverSolutionRequest Discover NLP request. -To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest -Parameter Sets: Post, PostViaIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest +Parameter Sets: Post Aliases: Required: True @@ -105,31 +102,45 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +### -IssueSummary +Describe the issue with the affected resource. + +```yaml +Type: System.String +Parameter Sets: PostExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Post operation ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity -Parameter Sets: PostViaIdentityExpanded, PostViaIdentity +Type: System.String +Parameter Sets: PostViaJsonFilePath Aliases: Required: True Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False Accept wildcard characters: False ``` -### -IssueSummary -Describe the issue with the affected resource. +### -JsonString +Json string supplied to the Post operation ```yaml Type: System.String -Parameter Sets: PostExpanded, PostViaIdentityExpanded +Parameter Sets: PostViaJsonString Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -141,7 +152,7 @@ Provide resourceId of affected resource ```yaml Type: System.String -Parameter Sets: PostExpanded, PostViaIdentityExpanded +Parameter Sets: PostExpanded Aliases: Required: False @@ -153,11 +164,11 @@ Accept wildcard characters: False ### -ServiceId Service Classification id for the resource. -You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list Service Id is the GUID which can be found under name field in Services List response +You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response ```yaml Type: System.String -Parameter Sets: PostExpanded, PostViaIdentityExpanded +Parameter Sets: PostExpanded Aliases: Required: False @@ -173,7 +184,7 @@ The value must be an UUID. ```yaml Type: System.String -Parameter Sets: PostExpanded, Post +Parameter Sets: (All) Aliases: Required: False @@ -219,13 +230,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest - -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md index 0ccee9e4bf12..0dfaf97693d3 100644 --- a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md +++ b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope.md @@ -25,6 +25,18 @@ Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -DiscoverSolutionRequest ] [-WhatIf] [-Confirm] [] ``` +### PostViaJsonFilePath +``` +Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -JsonFilePath [-DefaultProfile ] + [-WhatIf] [-Confirm] [] +``` + +### PostViaJsonString +``` +Invoke-AzSelfHelpDiscoverySolutionNlpTenantScope -JsonString [-DefaultProfile ] + [-WhatIf] [-Confirm] [] +``` + ## DESCRIPTION Solution discovery using natural language processing. @@ -76,10 +88,9 @@ Accept wildcard characters: False ### -DiscoverSolutionRequest Discover NLP request. -To construct, see NOTES section for DISCOVERSOLUTIONREQUEST properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest Parameter Sets: Post Aliases: @@ -105,6 +116,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Post operation + +```yaml +Type: System.String +Parameter Sets: PostViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Post operation + +```yaml +Type: System.String +Parameter Sets: PostViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceId Provide resourceId of affected resource @@ -122,7 +163,7 @@ Accept wildcard characters: False ### -ServiceId Service Classification id for the resource. -You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list Service Id is the GUID which can be found under name field in Services List response +You can find required serviceId from Services API: https://learn.microsoft.com/rest/api/support/services/list?tabs=HTTP Service Id is the GUID which can be found under name field in Services List response ```yaml Type: System.String @@ -172,11 +213,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiscoveryNlpRequest +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpRequest ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionNlpMetadataResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiscoveryNlpResponse ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpWarmSolutionUp.md b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpWarmSolutionUp.md index 0949d277f40e..6cdf99fa50f1 100644 --- a/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpWarmSolutionUp.md +++ b/src/SelfHelp/SelfHelp/help/Invoke-AzSelfHelpWarmSolutionUp.md @@ -19,6 +19,20 @@ Invoke-AzSelfHelpWarmSolutionUp -Scope -SolutionResourceName [ [] ``` +### WarmViaJsonString +``` +Invoke-AzSelfHelpWarmSolutionUp -Scope -SolutionResourceName -JsonString + [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] + [] +``` + +### WarmViaJsonFilePath +``` +Invoke-AzSelfHelpWarmSolutionUp -Scope -SolutionResourceName -JsonFilePath + [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] + [] +``` + ### Warm ``` Invoke-AzSelfHelpWarmSolutionUp -Scope -SolutionResourceName @@ -80,7 +94,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -94,6 +107,36 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Warm operation + +```yaml +Type: System.String +Parameter Sets: WarmViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Warm operation + +```yaml +Type: System.String +Parameter Sets: WarmViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Parameter Dictionary of \ @@ -129,7 +172,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: WarmExpanded, Warm +Parameter Sets: WarmExpanded, WarmViaJsonString, WarmViaJsonFilePath, Warm Aliases: Required: True @@ -144,7 +187,7 @@ Solution resource Name. ```yaml Type: System.String -Parameter Sets: WarmExpanded, Warm +Parameter Sets: WarmExpanded, WarmViaJsonString, WarmViaJsonFilePath, Warm Aliases: Required: True @@ -156,10 +199,9 @@ Accept wildcard characters: False ### -SolutionWarmUpRequestBody Solution WarmUpRequest body -To construct, see NOTES section for SOLUTIONWARMUPREQUESTBODY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody Parameter Sets: Warm, WarmViaIdentity Aliases: @@ -206,10 +248,10 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionWarmUpRequestBody - ### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionWarmUpRequestBody + ## OUTPUTS ### System.Boolean diff --git a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpDiagnostic.md b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpDiagnostic.md index be4fbf9acaa9..b746c9f8d6e6 100644 --- a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpDiagnostic.md +++ b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpDiagnostic.md @@ -8,19 +8,41 @@ schema: 2.0.0 # New-AzSelfHelpDiagnostic ## SYNOPSIS -Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. \
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.\
\
\Note: \ 'requiredInputs' from Discovery solutions response must be passed via 'additionalParameters' as an input to Diagnostics API. ## SYNTAX +### CreateExpanded (Default) ``` New-AzSelfHelpDiagnostic -SResourceName -Scope [-GlobalParameter ] [-Insight ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` +### CreateViaJsonString +``` +New-AzSelfHelpDiagnostic -SResourceName -Scope -JsonString + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaJsonFilePath +``` +New-AzSelfHelpDiagnostic -SResourceName -Scope -JsonFilePath + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaIdentityExpanded +``` +New-AzSelfHelpDiagnostic -InputObject [-GlobalParameter ] + [-Insight ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + ## DESCRIPTION -Creates a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. +create a diagnostic for the specific resource using solutionId and requiredInputs* from discovery solutions. \
Diagnostics are powerful solutions that access product resources or other relevant data and provide the root cause of the issue and the steps to address the issue.\
\
\Note: \ 'requiredInputs' from Discovery solutions response must be passed via 'additionalParameters' as an input to Diagnostics API. ## EXAMPLES @@ -79,7 +101,7 @@ Global parameters is an optional map which can be used to add key and value to r ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -89,13 +111,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: CreateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -Insight SolutionIds that are needed to be invoked. -To construct, see NOTES section for INSIGHT properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticInvocation[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticInvocation[] +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -105,6 +141,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NoWait Run the command asynchronously @@ -125,7 +191,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonString, CreateViaJsonFilePath Aliases: Required: True @@ -140,7 +206,7 @@ Unique resource name for insight resources ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonString, CreateViaJsonFilePath Aliases: DiagnosticsResourceName Required: True @@ -186,9 +252,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IDiagnosticResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IDiagnosticResource ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSimplifiedSolution.md b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSimplifiedSolution.md index ade0caa79367..756c5a45a623 100644 --- a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSimplifiedSolution.md +++ b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSimplifiedSolution.md @@ -8,7 +8,7 @@ schema: 2.0.0 # New-AzSelfHelpSimplifiedSolution ## SYNOPSIS -Creates a simplified Solutions for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. +create a simplified Solutions for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. In the absence of the 'Parameters' it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. \
\
\Note:\ \
1. 'requiredInputs' from Discovery solutions response must be passed via 'parameters' in the request body of simplified Solutions API. @@ -16,14 +16,36 @@ In the absence of the 'Parameters' it is likely that some of the simplified Solu ## SYNTAX +### CreateExpanded (Default) ``` New-AzSelfHelpSimplifiedSolution -SResourceName -Scope [-Parameter ] [-SolutionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` +### CreateViaJsonString +``` +New-AzSelfHelpSimplifiedSolution -SResourceName -Scope -JsonString + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaJsonFilePath +``` +New-AzSelfHelpSimplifiedSolution -SResourceName -Scope -JsonFilePath + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaIdentityExpanded +``` +New-AzSelfHelpSimplifiedSolution -InputObject [-Parameter ] + [-SolutionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + ## DESCRIPTION -Creates a simplified Solutions for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. +create a simplified Solutions for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. In the absence of the 'Parameters' it is likely that some of the simplified Solutions might fail execution, and you might see an empty response. \
\
\Note:\ \
1. 'requiredInputs' from Discovery solutions response must be passed via 'parameters' in the request body of simplified Solutions API. @@ -83,6 +105,51 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: CreateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NoWait Run the command asynchronously @@ -103,7 +170,7 @@ Client input parameters to run Simplified Solutions ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -118,7 +185,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonString, CreateViaJsonFilePath Aliases: Required: True @@ -133,7 +200,7 @@ Solution Id to identify single Simplified Solution. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -148,7 +215,7 @@ Simplified Solutions Resource Name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonString, CreateViaJsonFilePath Aliases: SimplifiedSolutionsResourceName Required: True @@ -194,9 +261,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISimplifiedSolutionsResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISimplifiedSolutionsResource ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSolution.md index 01da1c33b01f..3d250187c37a 100644 --- a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSolution.md +++ b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpSolution.md @@ -8,7 +8,7 @@ schema: 2.0.0 # New-AzSelfHelpSolution ## SYNOPSIS -Creates a solution for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. +create a solution for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. \
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. @@ -22,14 +22,35 @@ In the absence of the 'requiredParameters' it is likely that some of the solutio ## SYNTAX +### CreateExpanded (Default) ``` New-AzSelfHelpSolution -ResourceName -Scope [-Parameter ] [-TriggerCriterion ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` +### CreateViaJsonString +``` +New-AzSelfHelpSolution -ResourceName -Scope -JsonString [-DefaultProfile ] + [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSelfHelpSolution -ResourceName -Scope -JsonFilePath + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaIdentityExpanded +``` +New-AzSelfHelpSolution -InputObject [-Parameter ] + [-TriggerCriterion ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + ## DESCRIPTION -Creates a solution for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. +create a solution for the specific Azure resource or subscription using the inputs 'solutionId and requiredInputs' from discovery solutions. \
Azure solutions comprise a comprehensive library of self-help resources that have been thoughtfully curated by Azure engineers to aid customers in resolving typical troubleshooting issues. These solutions encompass (1.) dynamic and context-aware diagnostics, guided troubleshooting wizards, and data visualizations, (2.) rich instructional video tutorials and illustrative diagrams and images, and (3.) thoughtfully assembled textual troubleshooting instructions. All these components are seamlessly converged into unified solutions tailored to address a specific support problem area. @@ -98,6 +119,51 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: CreateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NoWait Run the command asynchronously @@ -118,7 +184,7 @@ Client input parameters to run Solution ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -133,7 +199,7 @@ Solution resource Name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonString, CreateViaJsonFilePath Aliases: SolutionResourceName Required: True @@ -148,7 +214,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonString, CreateViaJsonFilePath Aliases: Required: True @@ -160,11 +226,10 @@ Accept wildcard characters: False ### -TriggerCriterion Solution request trigger criteria -To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion[] +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -210,9 +275,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpTroubleshooter.md index 1b3fd62c70f6..f365c961ad64 100644 --- a/src/SelfHelp/SelfHelp/help/New-AzSelfHelpTroubleshooter.md +++ b/src/SelfHelp/SelfHelp/help/New-AzSelfHelpTroubleshooter.md @@ -8,7 +8,7 @@ schema: 2.0.0 # New-AzSelfHelpTroubleshooter ## SYNOPSIS -Creates the specific troubleshooter action under a resource or subscription using the 'solutionId' and 'properties.parameters' as the trigger. +create the specific troubleshooter action under a resource or subscription using the 'solutionId' and 'properties.parameters' as the trigger. \
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. @@ -16,13 +16,32 @@ Troubleshooters terminate at a well curated solution based off of resource backe ## SYNTAX +### CreateExpanded (Default) ``` New-AzSelfHelpTroubleshooter -Name -Scope [-Parameter ] [-SolutionId ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` +### CreateViaJsonString +``` +New-AzSelfHelpTroubleshooter -Name -Scope -JsonString [-DefaultProfile ] + [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonFilePath +``` +New-AzSelfHelpTroubleshooter -Name -Scope -JsonFilePath [-DefaultProfile ] + [-WhatIf] [-Confirm] [] +``` + +### CreateViaIdentityExpanded +``` +New-AzSelfHelpTroubleshooter -InputObject [-Parameter ] [-SolutionId ] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + ## DESCRIPTION -Creates the specific troubleshooter action under a resource or subscription using the 'solutionId' and 'properties.parameters' as the trigger. +create the specific troubleshooter action under a resource or subscription using the 'solutionId' and 'properties.parameters' as the trigger. \
Azure Troubleshooters help with hard to classify issues, reducing the gap between customer observed problems and solutions by guiding the user effortlessly through the troubleshooting process. Each Troubleshooter flow represents a problem area within Azure and has a complex tree-like structure that addresses many root causes. These flows are prepared with the help of Subject Matter experts and customer support engineers by carefully considering previous support requests raised by customers. @@ -66,12 +85,57 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity +Parameter Sets: CreateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Name Troubleshooter resource Name. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonString, CreateViaJsonFilePath Aliases: TroubleshooterName Required: True @@ -86,7 +150,7 @@ Client input parameters to run Troubleshooter Resource ```yaml Type: System.Collections.Hashtable -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -101,7 +165,7 @@ scope = resourceUri of affected resource.\
For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaJsonString, CreateViaJsonFilePath Aliases: Required: True @@ -116,7 +180,7 @@ Solution Id to identify single troubleshooter. ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -162,9 +226,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity + ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITroubleshooterResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITroubleshooterResource ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/Restart-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp/help/Restart-AzSelfHelpTroubleshooter.md index 21af2243a8bb..a942481634a6 100644 --- a/src/SelfHelp/SelfHelp/help/Restart-AzSelfHelpTroubleshooter.md +++ b/src/SelfHelp/SelfHelp/help/Restart-AzSelfHelpTroubleshooter.md @@ -67,7 +67,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity @@ -151,7 +150,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.IRestartTroubleshooterResponse +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.IRestartTroubleshooterResponse ## NOTES diff --git a/src/SelfHelp/SelfHelp/help/Stop-AzSelfHelpTroubleshooter.md b/src/SelfHelp/SelfHelp/help/Stop-AzSelfHelpTroubleshooter.md index ece3f0f05ce8..be1e2ee6509d 100644 --- a/src/SelfHelp/SelfHelp/help/Stop-AzSelfHelpTroubleshooter.md +++ b/src/SelfHelp/SelfHelp/help/Stop-AzSelfHelpTroubleshooter.md @@ -60,7 +60,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISelfHelpIdentity diff --git a/src/SelfHelp/SelfHelp/help/Update-AzSelfHelpSolution.md b/src/SelfHelp/SelfHelp/help/Update-AzSelfHelpSolution.md index 4a2c7ac46a9d..30411a4defd4 100644 --- a/src/SelfHelp/SelfHelp/help/Update-AzSelfHelpSolution.md +++ b/src/SelfHelp/SelfHelp/help/Update-AzSelfHelpSolution.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Update-AzSelfHelpSolution ## SYNOPSIS -Update the requiredInputs or additional information needed to execute the solution +update the requiredInputs or additional information needed to execute the solution ## SYNTAX @@ -19,6 +19,20 @@ Update-AzSelfHelpSolution -ResourceName -Scope [-Parameter ] ``` +### UpdateViaJsonString +``` +Update-AzSelfHelpSolution -ResourceName -Scope -JsonString + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzSelfHelpSolution -ResourceName -Scope -JsonFilePath + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + ### UpdateViaIdentityExpanded ``` Update-AzSelfHelpSolution -InputObject [-Parameter ] @@ -27,7 +41,7 @@ Update-AzSelfHelpSolution -InputObject [-Parameter For example: /subscriptions/0d0 ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath Aliases: Required: True @@ -162,11 +205,10 @@ Accept wildcard characters: False ### -TriggerCriterion Solution request trigger criteria -To construct, see NOTES section for TRIGGERCRITERION properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ITriggerCriterion[] -Parameter Sets: (All) +Type: Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ITriggerCriterion[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -216,7 +258,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.Api20240301Preview.ISolutionResource +### Microsoft.Azure.PowerShell.Cmdlets.SelfHelp.Models.ISolutionResource ## NOTES diff --git a/src/Sql/Sql/ChangeLog.md b/src/Sql/Sql/ChangeLog.md index d5a5e1a4ab69..de1d3c9beac4 100644 --- a/src/Sql/Sql/ChangeLog.md +++ b/src/Sql/Sql/ChangeLog.md @@ -21,6 +21,7 @@ ## Version 6.0.4 * Added server level action groups in enum of action groups to be able to be configured via auditing. +* Documented using managed identity with `New-AzSqlDatabaseExport` ## Version 6.0.3 * Added Information message to `Set-AzSqlInstance` for migrating Azure Sql database with GeoDr links to Azure Sql Hyperscale Edition diff --git a/src/Sql/Sql/help/New-AzSqlDatabaseExport.md b/src/Sql/Sql/help/New-AzSqlDatabaseExport.md index 4f6800ffde99..bb5f997b437d 100644 --- a/src/Sql/Sql/help/New-AzSqlDatabaseExport.md +++ b/src/Sql/Sql/help/New-AzSqlDatabaseExport.md @@ -28,7 +28,7 @@ The get export database status request may be sent to retrieve status informatio This cmdlet is also supported by the SQL Server Stretch Database service on Azure. > [!IMPORTANT] -> In order to make use of this cmdlet the firewall on the Azure SQL Server will need to be configured to "Allow Azure services and resources to access this server". If this is not configured then GatewayTimeout errors will be experienced. +> In order to make use of this cmdlet the firewall on the Azure SQL Server will need to be configured to "Allow Azure services and resources to access this server". If this is not configured then GatewayTimeout errors will be experienced. This is not required if a Private Link connection is established via the UseNetworkIsolation parameter. ## EXAMPLES @@ -55,11 +55,39 @@ ErrorMessage : This command creates an export request for the specified database. +### Example 2: Create an export request for a database using managed identity for authentication over private link + +```powershell +$sqlServerName = "Server01" +$storageAccountName = "storageaccount1" +$subscriptionId = "00000000-0000-0000-0000-000000000000" +$resourceGroup = "RG01" +$managedIdentityResourceId = "/subscriptions/$subscriptionId/resourceGroups/$resourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-managed-identity" +$pw = ConvertTo-SecureString "AdministratorPassword" -AsPlainText -Force +New-AzSqlDatabaseExport ` + -ResourceGroupName $resourceGroup ` + -ServerName $sqlServerName ` + -DatabaseName "Database01" ` + -StorageKeyType ManagedIdentity ` + -StorageKey $managedIdentityResourceId ` + -StorageUri "https://storageaccount1.blob.core.windows.net/container1/my-file-name.bacpac" ` + -AuthenticationType ManagedIdentity ` + -AdministratorLogin $managedIdentityResourceId ` + -AdministratorLoginPassword $pw ` + -UseNetworkIsolation $true ` + -SqlServerResourceIdForPrivateLink "/subscriptions/$subscriptionId/resourceGroups/$resourceGroup/providers/Microsoft.Sql/servers/$sqlServerName" ` + -StorageAccountResourceIdForPrivateLink "/subscriptions/$subscriptionId/resourceGroups/$resourceGroup/providers/Microsoft.Storage/storageAccounts/$storageAccountName" +``` + +This command creates an export request for the specified database using managed identity for authentication with connectivity over Private Link. + ## PARAMETERS ### -AdministratorLogin Specifies the name of the SQL administrator. +If `-AuthenticationType ManagedIdentity` is provided, this should be the full resource ID of a user-assigned managed identity that is a [Microsoft Entra administrator](https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-aad-configure?view=azuresql&tabs=azure-portal#set-microsoft-entra-admin) of the server. + ```yaml Type: System.String Parameter Sets: (All) @@ -75,6 +103,17 @@ Accept wildcard characters: False ### -AdministratorLoginPassword Specifies the password of the SQL administrator. +This is mandatory. When using `-AuthenticationType ManagedIdentity` a dummy value must be provided, for example: + +``` +$administratorPassword = ConvertTo-SecureString "AdministratorPassword" -AsPlainText -Force + +New-AzSqlDatabaseExport ` + #... + -AdministratorLoginPassword $administratorPassword ` + #... +``` + ```yaml Type: System.Security.SecureString Parameter Sets: (All) @@ -98,6 +137,9 @@ Set the *AdministratorLogin* and *AdministratorLoginPassword* to the SQL adminis Microsoft Entra authentication. Set *AdministratorLogin* and *AdministratorLoginPassword* to the Microsoft Entra administrator username and password. This parameter is only available on SQL Database V12 servers. +- ManagedIdentity. +Managed identity authentication. +Use a user-assigned managed identity to authenticate with the SQL server. The managed identity must be a [Microsoft Entra administrator](https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-aad-configure?view=azuresql&tabs=azure-portal#set-microsoft-entra-admin) for the server. ```yaml Type: Microsoft.Azure.Commands.Sql.ImportExport.Model.AuthenticationType @@ -205,6 +247,8 @@ Accept wildcard characters: False ### -StorageKey Specifies the access key for the storage account. +When `-StorageKeyType ManagedIdentity` is provided, this should be the full resource ID of a user-assigned managed identity which has write access on the storage account for the StorageUri provided (for example via a [Storage Blob Data Contributor](https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/storage#storage-blob-data-contributor) role assignment). + ```yaml Type: System.String Parameter Sets: (All) @@ -224,6 +268,8 @@ The acceptable values for this parameter are: This value uses a storage account key. - SharedAccessKey. This value uses a Shared Access Signature (SAS) key. +- ManagedIdentity. +Use a user-assigned managed identity for authentication with the storage account. ```yaml Type: Microsoft.Azure.Commands.Sql.ImportExport.Model.StorageKeyType @@ -241,6 +287,12 @@ Accept wildcard characters: False ### -StorageUri Specifies the blob link, as a URL, to the .bacpac file. +For example: + +``` +-StorageUri "https://your-storage-account.blob.core.windows.net/your-container/your-file-name.bacpac" ` +``` + ```yaml Type: System.Uri Parameter Sets: (All) diff --git a/src/Sql/Sql/help/Restore-AzSqlDatabase.md b/src/Sql/Sql/help/Restore-AzSqlDatabase.md index bd0b8795a907..2e890913623c 100644 --- a/src/Sql/Sql/help/Restore-AzSqlDatabase.md +++ b/src/Sql/Sql/help/Restore-AzSqlDatabase.md @@ -664,8 +664,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable [Recover an Azure SQL Database from an outage](http://go.microsoft.com/fwlink/?LinkId=746882) -[Recover an Azure SQL Database from a user error](http://go.microsoft.com/fwlink/?LinkId=746944) - [Get-AzSqlDatabase](./Get-AzSqlDatabase.md) [Get-AzSqlDatabaseGeoBackup](./Get-AzSqlDatabaseGeoBackup.md) diff --git a/src/Storage/LiveTests/Storage.Management/FileTests.ps1 b/src/Storage/LiveTests/Storage.Management/FileTests.ps1 index 41150f795e78..c9217d6979ee 100644 --- a/src/Storage/LiveTests/Storage.Management/FileTests.ps1 +++ b/src/Storage/LiveTests/Storage.Management/FileTests.ps1 @@ -8,29 +8,31 @@ Invoke-LiveTestScenario -Name "File basics" -Description "Test File basic operat $testfile512path = "$PSScriptRoot\TestFiles\testfile512" $localDestFile = "$PSScriptRoot\TestFiles\dest" $location = $rg.Location - $account = New-AzStorageAccount -ResourceGroupName $rgName -Name $storageAccountName -Location $location -SkuName Standard_GRS -AllowSharedKeyAccess $true -Tag @{"Az.Sec.DisableAllowSharedKeyAccess::Skip" = "For Powershell test."} - $ctx = $account.Context + $account = New-AzStorageAccount -ResourceGroupName $rgName -Name $storageAccountName -Location $location -SkuName Standard_GRS -AllowSharedKeyAccess $true -Tag @{ "Az.Sec.DisableAllowSharedKeyAccess::Skip" = "For Powershell test." } + $ctx = $account.Context $ctx1 = New-AzStorageContext -StorageAccountName $storageAccountName -StorageAccountKey (Get-AzStorageAccountKey -ResourceGroupName $rgName -Name $storageAccountName)[0].Value - $objectName1 = "filetest1.txt" # Removed the trailing dot temporarily to fix the case - $objectName2 = "filetest2.txt" + $objectName1 = "filetest1.txt" # Removed the trailing dot temporarily to fix the case + $objectName2 = "filetest2.txt" - #Create a file share + #Create a file share New-AzStorageShare $shareName -Context $ctx $Share = Get-AzStorageShare -Name $shareName -Context $ctx Assert-AreEqual $Share.Count 1 Assert-AreEqual $Share[0].Name $shareName # upload file - $t = Set-AzStorageFileContent -source $testfile512path -ShareName $shareName -Path $objectName1 -Force -Context $ctx -asjob - $t | wait-job - Assert-AreEqual $t.State "Completed" - Assert-AreEqual $t.Error $null - - # upload/remove file/dir with -DisAllowTrailingDot - $dirName1WithTrailingDot = "testdir1.." - $dirName1WithOutTrailingDot = "testdir1" - $objectPathWithoutTrailingDot = "testdir1/filetest1.txt" + $t = Set-AzStorageFileContent -source $testfile512path -ShareName $shareName -Path $objectName1 -Force -Context $ctx -AsJob + $t | Wait-Job + $t | Receive-Job + + Assert-AreEqual "Completed" $t.State + Assert-Null $t.Error + + # upload/remove file/dir with -DisAllowTrailingDot + $dirName1WithTrailingDot = "testdir1.." + $dirName1WithOutTrailingDot = "testdir1" + $objectPathWithoutTrailingDot = "testdir1/filetest1.txt" New-AzStorageDirectory -ShareName $shareName -Path $dirName1WithTrailingDot -Context $ctx1 -DisAllowTrailingDot $file11 = Set-AzStorageFileContent -source $testfile512path -ShareName $shareName -Path "$($dirName1WithTrailingDot)/$($objectName1)" -Force -Context $ctx1 -DisAllowTrailingDot $file = Get-AzStorageFile -ShareName $shareName -Path $objectPathWithoutTrailingDot -Context $ctx1 -DisAllowTrailingDot @@ -39,26 +41,23 @@ Invoke-LiveTestScenario -Name "File basics" -Description "Test File basic operat Remove-AzStorageFile -ShareName $shareName -Path "$($dirName1WithTrailingDot)/$($objectName1)" -Context $ctx1 -DisAllowTrailingDot Remove-AzStorageDirectory -ShareName $shareName -Path $dirName1WithTrailingDot -Context $ctx1 -DisAllowTrailingDot - # list file + # list file $file = Get-AzStorageFile -ShareName $shareName -Context $ctx Assert-AreEqual $file.Count 1 Assert-AreEqual $file[0].Name $objectName1 Assert-NotNull $file[0].ListFileProperties.Properties.ETag - if ($Env:OS -eq "Windows_NT") - { - Set-AzStorageFileContent -source $testfile512path -ShareName $shareName -Path $objectName1 -PreserveSMBAttribute -Force -Context $ctx + if ($Env:OS -eq "Windows_NT") { + Set-AzStorageFileContent -source $testfile512path -ShareName $shareName -Path $objectName1 -PreserveSMBAttribute -Force -Context $ctx } - else - { + else { Set-AzStorageFileContent -source $testfile512path -ShareName $shareName -Path $objectName1 -Force -Context $ctx } - $file = Get-AzStorageFile -ShareName $shareName -Context $ctx + $file = Get-AzStorageFile -ShareName $shareName -Context $ctx Assert-AreEqual $file.Count 1 Assert-AreEqual $file[0].Name $objectName1 Assert-NotNull $file[0].ListFileProperties.Properties.ETag - if ($Env:OS -eq "Windows_NT") - { + if ($Env:OS -eq "Windows_NT") { $localFileProperties = Get-ItemProperty $testfile512path Assert-AreEqual $localFileProperties.CreationTime.ToUniversalTime().Ticks $file[0].ListFileProperties.Properties.CreatedOn.ToUniversalTime().Ticks Assert-AreEqual $localFileProperties.LastWriteTime.ToUniversalTime().Ticks $file[0].ListFileProperties.Properties.LastWrittenOn.ToUniversalTime().Ticks @@ -72,23 +71,22 @@ Invoke-LiveTestScenario -Name "File basics" -Description "Test File basic operat Assert-AreEqual $file[0].Name $objectName1 Assert-AreEqual $file[1].Name $objectName2 - $t = Get-AzStorageFileContent -ShareName $shareName -Path $objectName1 -Destination $localDestFile -Force -Context $ctx -asjob - $t | wait-job - Assert-AreEqual $t.State "Completed" - Assert-AreEqual $t.Error $null + $t = Get-AzStorageFileContent -ShareName $shareName -Path $objectName1 -Destination $localDestFile -Force -Context $ctx -AsJob + $t | Wait-Job + $t | Receive-Job + + Assert-AreEqual "Completed" $t.State + Assert-Null $t.Error Assert-AreEqual (Get-FileHash -Path $localDestFile -Algorithm MD5).Hash (Get-FileHash -Path $testfile512path -Algorithm MD5).Hash - - if ($Env:OS -eq "Windows_NT") - { + + if ($Env:OS -eq "Windows_NT") { Get-AzStorageFileContent -ShareName $shareName -Path $objectName1 -Destination $localDestFile -PreserveSMBAttribute -Force -Context $ctx1 } - else - { + else { Get-AzStorageFileContent -ShareName $shareName -Path $objectName1 -Destination $localDestFile -Force -Context $ctx } Assert-AreEqual (Get-FileHash -Path $localDestFile -Algorithm MD5).Hash (Get-FileHash -Path $testfile512path -Algorithm MD5).Hash - if ($Env:OS -eq "Windows_NT") - { + if ($Env:OS -eq "Windows_NT") { $file = Get-AzStorageFile -ShareName $shareName -Path $objectName1 -Context $ctx1 $localFileProperties = Get-ItemProperty $testfile512path Assert-AreEqual $localFileProperties.CreationTime.ToUniversalTime().Ticks $file[0].FileProperties.SmbProperties.FileCreatedOn.ToUniversalTime().Ticks @@ -100,22 +98,22 @@ Invoke-LiveTestScenario -Name "File basics" -Description "Test File basic operat $file = Get-AzStorageFile -ShareName $shareName -Path $objectName1 -Context $ctx $file2 = Rename-AzStorageFile -ShareName $shareName -SourcePath $objectName1 -DestinationPath $fileName1 -Context $ctx - Assert-AreEqual $file2.Name $fileName1 + Assert-AreEqual $file2.Name $fileName1 Assert-AreEqual $file.FileProperties.ContentType $file2.FileProperties.ContentType Assert-AreEqual $file.FileProperties.ContentLength $file2.FileProperties.ContentLength $file3 = $file2 | Rename-AzStorageFile -DestinationPath $fileName1 -Context $ctx1 -Force - Assert-AreEqual $file3.Name $fileName1 + Assert-AreEqual $file3.Name $fileName1 Assert-AreEqual $file2.FileProperties.ContentType $file3.FileProperties.ContentType Assert-AreEqual $file2.FileProperties.ContentLength $file3.FileProperties.ContentLength - + Remove-AzStorageFile -ShareName $shareName -Path $fileName1 -Context $ctx $file = Get-AzStorageFile -ShareName $shareName -Context $ctx Assert-AreEqual $file.Count 1 Assert-AreEqual $file[0].Name $objectName2 $dirName = "filetestdir" - New-AzStorageDirectory -ShareName $shareName -Path $dirName -Context $ctx + New-AzStorageDirectory -ShareName $shareName -Path $dirName -Context $ctx $file = Get-AzStorageShare -Name $shareName -Context $ctx1 | Get-AzStorageFile -ExcludeExtendedInfo Assert-AreEqual $file.Count 2 Assert-AreEqual $file[0].Name $dirName @@ -125,7 +123,7 @@ Invoke-LiveTestScenario -Name "File basics" -Description "Test File basic operat Assert-AreEqual $file[1].GetType().Name "AzureStorageFile" Assert-Null $file[1].ListFileProperties.Properties.ETag - $newDir = "new" + $dirName # + ".." Removed the trailing dots temporarily to fix the case + $newDir = "new" + $dirName # + ".." Removed the trailing dots temporarily to fix the case $dir = Get-AzStorageFile -ShareName $shareName -Path $dirName -Context $ctx $dir2 = Rename-AzStorageDirectory -ShareName $shareName -SourcePath $dirName -DestinationPath $newDir -Context $ctx1 Assert-AreEqual $newDir $dir2.Name @@ -146,4 +144,4 @@ Invoke-LiveTestScenario -Name "File basics" -Description "Test File basic operat # Clean Storage Account Remove-AzStorageShare -Name $shareName -Force -Context $ctx -} \ No newline at end of file +} diff --git a/src/Storage/Storage.Management/help/Set-AzStorageAccount.md b/src/Storage/Storage.Management/help/Set-AzStorageAccount.md index 5258b60d1da5..21e18083460d 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageAccount.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageAccount.md @@ -452,7 +452,7 @@ This command updates a storage account with Keyvault from another tenant (access Specifies the access tier of the Storage account that this cmdlet modifies. The acceptable values for this parameter are: Hot and Cool. If you change the access tier, it may result in additional charges. For more information, see -[Azure Blob Storage: Hot and cool storage tiers](http://go.microsoft.com/fwlink/?LinkId=786482). +[Azure Blob Storage: Hot and cool storage tiers](https://azure.microsoft.com/pricing/details/storage/blobs/). If the Storage account has Kind as StorageV2 or BlobStorage, you can specify the *AccessTier* parameter. If the Storage account has Kind as Storage, do not specify the *AccessTier* parameter. diff --git a/tools/TestFx/Live/LiveTestUtility.psm1 b/tools/TestFx/Live/LiveTestUtility.psm1 index eb0e5756e936..9903c922d060 100644 --- a/tools/TestFx/Live/LiveTestUtility.psm1 +++ b/tools/TestFx/Live/LiveTestUtility.psm1 @@ -429,7 +429,7 @@ function Clear-LiveTestResources { param ( [Parameter(Mandatory, Position = 0)] [ValidateNotNullOrEmpty()] - [Alias("ResourceGroupname")] + [Alias("ResourceGroupName")] [string] $Name )